[STATEMENT]
lemma linear_inj_image_is_basis:
assumes inj_T: "inj_on T (carrier V)" and surj: "T` (carrier V) = carrier W"
and basis_B: "V.basis B"
and fin_dim_V: "V.fin_dim"
shows "W.basis (T`B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W.basis (T ` B)
[PROOF STEP]
proof (rule W.dim_li_is_basis)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. W.fin_dim
 2. finite (T ` B)
 3. T ` B \<subseteq> carrier W
 4. W.module.lin_indpt (T ` B)
 5. W.dim \<le> card (T ` B)
[PROOF STEP]
have lm: "linear_map K V W T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linear_map K V W T
[PROOF STEP]
by intro_locales
[PROOF STATE]
proof (state)
this:
linear_map K V W T

goal (5 subgoals):
 1. W.fin_dim
 2. finite (T ` B)
 3. T ` B \<subseteq> carrier W
 4. W.module.lin_indpt (T ` B)
 5. W.dim \<le> card (T ` B)
[PROOF STEP]
have inj_TB: "inj_on T B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on T B
[PROOF STEP]
by (meson basis_B inj_T subset_inj_on V.basis_def)
[PROOF STATE]
proof (state)
this:
inj_on T B

goal (5 subgoals):
 1. W.fin_dim
 2. finite (T ` B)
 3. T ` B \<subseteq> carrier W
 4. W.module.lin_indpt (T ` B)
 5. W.dim \<le> card (T ` B)
[PROOF STEP]
show "W.fin_dim"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W.fin_dim
[PROOF STEP]
by (rule surj_fin_dim[OF fin_dim_V surj])
[PROOF STATE]
proof (state)
this:
W.fin_dim

goal (4 subgoals):
 1. finite (T ` B)
 2. T ` B \<subseteq> carrier W
 3. W.module.lin_indpt (T ` B)
 4. W.dim \<le> card (T ` B)
[PROOF STEP]
show "finite (T ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (T ` B)
[PROOF STEP]
proof (rule finite_imageI, rule V.fin[OF fin_dim_V])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. V.module.lin_indpt B
 2. B \<subseteq> carrier V
[PROOF STEP]
show "V.module.lin_indpt B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V.module.lin_indpt B
[PROOF STEP]
using basis_B
[PROOF STATE]
proof (prove)
using this:
V.basis B

goal (1 subgoal):
 1. V.module.lin_indpt B
[PROOF STEP]
unfolding V.basis_def
[PROOF STATE]
proof (prove)
using this:
V.module.lin_indpt B \<and> V.module.gen_set B \<and> B \<subseteq> carrier V

goal (1 subgoal):
 1. V.module.lin_indpt B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
V.module.lin_indpt B

goal (1 subgoal):
 1. B \<subseteq> carrier V
[PROOF STEP]
show "B \<subseteq> carrier V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> carrier V
[PROOF STEP]
using basis_B
[PROOF STATE]
proof (prove)
using this:
V.basis B

goal (1 subgoal):
 1. B \<subseteq> carrier V
[PROOF STEP]
unfolding V.basis_def
[PROOF STATE]
proof (prove)
using this:
V.module.lin_indpt B \<and> V.module.gen_set B \<and> B \<subseteq> carrier V

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite (T ` B)

goal (3 subgoals):
 1. T ` B \<subseteq> carrier W
 2. W.module.lin_indpt (T ` B)
 3. W.dim \<le> card (T ` B)
[PROOF STEP]
show "T ` B \<subseteq> carrier W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T ` B \<subseteq> carrier W
[PROOF STEP]
using basis_B
[PROOF STATE]
proof (prove)
using this:
V.basis B

goal (1 subgoal):
 1. T ` B \<subseteq> carrier W
[PROOF STEP]
unfolding V.basis_def
[PROOF STATE]
proof (prove)
using this:
V.module.lin_indpt B \<and> V.module.gen_set B \<and> B \<subseteq> carrier V

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

goal (2 subgoals):
 1. W.module.lin_indpt (T ` B)
 2. W.dim \<le> card (T ` B)
[PROOF STEP]
show "W.dim \<le> card (T ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
have d: "V.dim = W.dim"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V.dim = W.dim
[PROOF STEP]
by (rule dim_eq[OF fin_dim_V inj_T surj])
[PROOF STATE]
proof (state)
this:
V.dim = W.dim

goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
have "card (T` B) = card B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (T ` B) = card B
[PROOF STEP]
by (simp add: card_image inj_TB)
[PROOF STATE]
proof (state)
this:
card (T ` B) = card B

goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (T ` B) = card B

goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
have "... = V.dim"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card B = V.dim
[PROOF STEP]
using basis_B fin_dim_V V.basis_def V.dim_basis V.fin
[PROOF STATE]
proof (prove)
using this:
V.basis B
V.fin_dim
V.basis ?A = (V.module.lin_indpt ?A \<and> V.module.gen_set ?A \<and> ?A \<subseteq> carrier V)
\<lbrakk>finite ?A; V.basis ?A\<rbrakk> \<Longrightarrow> V.dim = card ?A
\<lbrakk>V.fin_dim; V.module.lin_indpt ?A; ?A \<subseteq> carrier V\<rbrakk> \<Longrightarrow> finite ?A

goal (1 subgoal):
 1. card B = V.dim
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card B = V.dim

goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (T ` B) = V.dim
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (T ` B) = V.dim

goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
using d
[PROOF STATE]
proof (prove)
using this:
card (T ` B) = V.dim
V.dim = W.dim

goal (1 subgoal):
 1. W.dim \<le> card (T ` B)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
W.dim \<le> card (T ` B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
W.dim \<le> card (T ` B)

goal (1 subgoal):
 1. W.module.lin_indpt (T ` B)
[PROOF STEP]
show "W.module.lin_indpt (T ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W.module.lin_indpt (T ` B)
[PROOF STEP]
proof (rule W.module.finite_lin_indpt2)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. finite (T ` B)
 2. T ` B \<subseteq> carrier W
 3. \<And>a. \<lbrakk>a \<in> T ` B \<rightarrow> carrier K; W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
show fin_TB: "finite (T ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (T ` B)
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
finite (T ` B)

goal (2 subgoals):
 1. T ` B \<subseteq> carrier W
 2. \<And>a. \<lbrakk>a \<in> T ` B \<rightarrow> carrier K; W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
show TB_W: "T ` B \<subseteq> carrier W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T ` B \<subseteq> carrier W
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
T ` B \<subseteq> carrier W

goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> T ` B \<rightarrow> carrier K; W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> T ` B \<rightarrow> carrier K; W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
assume a: "a \<in> T ` B \<rightarrow> carrier K" and lc_a: "W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>"
[PROOF STATE]
proof (state)
this:
a \<in> T ` B \<rightarrow> carrier K
W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>

goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> T ` B \<rightarrow> carrier K; W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
show "\<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
proof (rule ballI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
fix v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
assume v: "v \<in> T ` B"
[PROOF STATE]
proof (state)
this:
v \<in> T ` B

goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
have "W.module.lincomb a (T ` B) = T (V.module.lincomb (a \<circ> T) B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W.module.lincomb a (T ` B) = T (V.module.lincomb (a \<circ> T) B)
[PROOF STEP]
proof (rule lincomb_linear_image[OF inj_T])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. B \<subseteq> carrier V
 2. a \<in> T ` B \<rightarrow> carrier K
 3. finite B
[PROOF STEP]
show "B \<subseteq> carrier V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> carrier V
[PROOF STEP]
using V.vectorspace_axioms basis_B vectorspace.basis_def
[PROOF STATE]
proof (prove)
using this:
vectorspace K V
V.basis B
vectorspace ?K ?V \<Longrightarrow> vectorspace.basis ?K ?V ?A = (\<not> LinearCombinations.module.lin_dep ?K ?V ?A \<and> LinearCombinations.module.span ?K ?V ?A = carrier ?V \<and> ?A \<subseteq> carrier ?V)

goal (1 subgoal):
 1. B \<subseteq> carrier V
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B \<subseteq> carrier V

goal (2 subgoals):
 1. a \<in> T ` B \<rightarrow> carrier K
 2. finite B
[PROOF STEP]
show "a \<in> T ` B \<rightarrow> carrier K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> T ` B \<rightarrow> carrier K
[PROOF STEP]
by (simp add: a)
[PROOF STATE]
proof (state)
this:
a \<in> T ` B \<rightarrow> carrier K

goal (1 subgoal):
 1. finite B
[PROOF STEP]
show "finite B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite B
[PROOF STEP]
using fin_TB finite_image_iff inj_TB
[PROOF STATE]
proof (prove)
using this:
finite (T ` B)
inj_on ?f ?A \<Longrightarrow> finite (?f ` ?A) = finite ?A
inj_on T B

goal (1 subgoal):
 1. finite B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite B

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
W.module.lincomb a (T ` B) = T (V.module.lincomb (a \<circ> T) B)

goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
hence T_lincomb: "T (V.module.lincomb (a \<circ> T) B) = \<zero>\<^bsub>W\<^esub>"
[PROOF STATE]
proof (prove)
using this:
W.module.lincomb a (T ` B) = T (V.module.lincomb (a \<circ> T) B)

goal (1 subgoal):
 1. T (V.module.lincomb (a \<circ> T) B) = \<zero>\<^bsub>W\<^esub>
[PROOF STEP]
using lc_a
[PROOF STATE]
proof (prove)
using this:
W.module.lincomb a (T ` B) = T (V.module.lincomb (a \<circ> T) B)
W.module.lincomb a (T ` B) = \<zero>\<^bsub>W\<^esub>

goal (1 subgoal):
 1. T (V.module.lincomb (a \<circ> T) B) = \<zero>\<^bsub>W\<^esub>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
T (V.module.lincomb (a \<circ> T) B) = \<zero>\<^bsub>W\<^esub>

goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
have lincomb_0: "V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>
[PROOF STEP]
have "a \<circ> T \<in> B \<rightarrow> carrier K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a \<in> T ` B \<rightarrow> carrier K

goal (1 subgoal):
 1. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<circ> T \<in> B \<rightarrow> carrier K

goal (1 subgoal):
 1. V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a \<circ> T \<in> B \<rightarrow> carrier K

goal (1 subgoal):
 1. V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>
[PROOF STEP]
by (metis V.module.M.zero_closed V.module.lincomb_closed
            T_lincomb basis_B f0_is_0 inj_T inj_onD  V.basis_def)
[PROOF STATE]
proof (state)
this:
V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
V.module.lincomb (a \<circ> T) B = \<zero>\<^bsub>V\<^esub>

goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
have "(a \<circ> T) \<in> B \<rightarrow> {\<zero>\<^bsub>K\<^esub>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<circ> T \<in> B \<rightarrow> {\<zero>\<^bsub>K\<^esub>}
[PROOF STEP]
proof (rule V.not_lindepD[OF _ _ _ _ lincomb_0])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. V.module.lin_indpt ?S
 2. finite B
 3. B \<subseteq> ?S
 4. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
show "V.module.lin_indpt B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V.module.lin_indpt B
[PROOF STEP]
using V.basis_def basis_B
[PROOF STATE]
proof (prove)
using this:
V.basis ?A = (V.module.lin_indpt ?A \<and> V.module.gen_set ?A \<and> ?A \<subseteq> carrier V)
V.basis B

goal (1 subgoal):
 1. V.module.lin_indpt B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
V.module.lin_indpt B

goal (3 subgoals):
 1. finite B
 2. B \<subseteq> B
 3. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
show "finite B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite B
[PROOF STEP]
using fin_TB finite_image_iff inj_TB
[PROOF STATE]
proof (prove)
using this:
finite (T ` B)
inj_on ?f ?A \<Longrightarrow> finite (?f ` ?A) = finite ?A
inj_on T B

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

goal (2 subgoals):
 1. B \<subseteq> B
 2. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
show "B \<subseteq> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
B \<subseteq> B

goal (1 subgoal):
 1. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
show "a \<circ> T \<in> B \<rightarrow> carrier K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a \<in> T ` B \<rightarrow> carrier K

goal (1 subgoal):
 1. a \<circ> T \<in> B \<rightarrow> carrier K
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<circ> T \<in> B \<rightarrow> carrier K

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a \<circ> T \<in> B \<rightarrow> {\<zero>\<^bsub>K\<^esub>}

goal (1 subgoal):
 1. \<And>v. v \<in> T ` B \<Longrightarrow> a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
thus "a v = \<zero>\<^bsub>K\<^esub>"
[PROOF STATE]
proof (prove)
using this:
a \<circ> T \<in> B \<rightarrow> {\<zero>\<^bsub>K\<^esub>}

goal (1 subgoal):
 1. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
using v
[PROOF STATE]
proof (prove)
using this:
a \<circ> T \<in> B \<rightarrow> {\<zero>\<^bsub>K\<^esub>}
v \<in> T ` B

goal (1 subgoal):
 1. a v = \<zero>\<^bsub>K\<^esub>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a v = \<zero>\<^bsub>K\<^esub>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>v\<in>T ` B. a v = \<zero>\<^bsub>K\<^esub>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
W.module.lin_indpt (T ` B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma act_dom_proj_eff_subset_act_dom_eff:
  fixes a vs
  shows "fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
have "snd (action_proj a vs) = fmrestrict_set vs (snd a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (action_proj a vs) = fmrestrict_set vs (snd a)
[PROOF STEP]
unfolding action_proj_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (fmrestrict_set vs (fst a), fmrestrict_set vs (snd a)) = fmrestrict_set vs (snd a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
snd (action_proj a vs) = fmrestrict_set vs (snd a)

goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
snd (action_proj a vs) = fmrestrict_set vs (snd a)
[PROOF STEP]
have "fmlookup (fmrestrict_set vs (snd a)) \<subseteq>\<^sub>m fmlookup (snd a)"
[PROOF STATE]
proof (prove)
using this:
snd (action_proj a vs) = fmrestrict_set vs (snd a)

goal (1 subgoal):
 1. fmlookup (fmrestrict_set vs (snd a)) \<subseteq>\<^sub>m fmlookup (snd a)
[PROOF STEP]
by (simp add: map_le_def fmdom'_restrict_set_precise)
[PROOF STATE]
proof (state)
this:
fmlookup (fmrestrict_set vs (snd a)) \<subseteq>\<^sub>m fmlookup (snd a)

goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fmlookup (fmrestrict_set vs (snd a)) \<subseteq>\<^sub>m fmlookup (snd a)
[PROOF STEP]
have "dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))"
[PROOF STATE]
proof (prove)
using this:
fmlookup (fmrestrict_set vs (snd a)) \<subseteq>\<^sub>m fmlookup (snd a)

goal (1 subgoal):
 1. dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))
[PROOF STEP]
using map_le_implies_dom_le
[PROOF STATE]
proof (prove)
using this:
fmlookup (fmrestrict_set vs (snd a)) \<subseteq>\<^sub>m fmlookup (snd a)
?f \<subseteq>\<^sub>m ?g \<Longrightarrow> dom ?f \<subseteq> dom ?g

goal (1 subgoal):
 1. dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))

goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))
[PROOF STEP]
have "fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)"
[PROOF STATE]
proof (prove)
using this:
dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))

goal (1 subgoal):
 1. fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
using fmdom'.rep_eq
[PROOF STATE]
proof (prove)
using this:
dom (fmlookup (fmrestrict_set vs (snd a))) \<subseteq> dom (fmlookup (snd a))
fmdom' ?x = dom (fmlookup ?x)

goal (1 subgoal):
 1. fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)

goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)

goal (1 subgoal):
 1. fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)
[PROOF STEP]
unfolding action_proj_def
[PROOF STATE]
proof (prove)
using this:
fmdom' (fmrestrict_set vs (snd a)) \<subseteq> fmdom' (snd a)

goal (1 subgoal):
 1. fmdom' (snd (fmrestrict_set vs (fst a), fmrestrict_set vs (snd a))) \<subseteq> fmdom' (snd a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fmdom' (snd (action_proj a vs)) \<subseteq> fmdom' (snd a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mult_matrix_assoc_simple:
  assumes
  "\<forall>a. fmul 0 a = 0"
  "\<forall>a. fmul a 0 = 0"
  "fadd 0 0 = 0"
  "associative fadd"
  "commutative fadd"
  "associative fmul"
  "distributive fmul fadd"
  shows "mult_matrix fmul fadd (mult_matrix fmul fadd A B) C = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mult_matrix fmul fadd (mult_matrix fmul fadd A B) C = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mult_matrix fmul fadd (mult_matrix fmul fadd A B) C = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)
[PROOF STEP]
have "!! a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>a. fmul (0::'a) a = (0::'a)
\<forall>a. fmul a (0::'a) = (0::'a)
fadd (0::'a) (0::'a) = (0::'a)
associative fadd
commutative fadd
associative fmul
distributive fmul fadd

goal (1 subgoal):
 1. \<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)
[PROOF STEP]
by (simp add: associative_def commutative_def)
[PROOF STATE]
proof (state)
this:
fadd (fadd ?a ?b) (fadd ?c ?d) = fadd (fadd ?a ?c) (fadd ?b ?d)

goal (1 subgoal):
 1. mult_matrix fmul fadd (mult_matrix fmul fadd A B) C = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fadd (fadd ?a ?b) (fadd ?c ?d) = fadd (fadd ?a ?c) (fadd ?b ?d)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fadd (fadd ?a ?b) (fadd ?c ?d) = fadd (fadd ?a ?c) (fadd ?b ?d)

goal (1 subgoal):
 1. mult_matrix fmul fadd (mult_matrix fmul fadd A B) C = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)
[PROOF STEP]
apply (subst mult_matrix_assoc)
[PROOF STATE]
proof (prove)
goal (9 subgoals):
 1. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a. fmul (0::'a) a = (0::'a)
 2. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a. fmul a (0::'a) = (0::'a)
 3. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> fadd (0::'a) (0::'a) = (0::'a)
 4. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)
 5. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> associative fadd
 6. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c. fmul (fmul a b) c = fmul a (fmul b c)
 7. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c. fmul (fadd a b) c = fadd (fmul a c) (fmul b c)
 8. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c. fmul c (fadd a b) = fadd (fmul c a) (fmul c b)
 9. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> mult_matrix fmul fadd A (mult_matrix fmul fadd B C) = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>a. fmul (0::'a) a = (0::'a)
\<forall>a. fmul a (0::'a) = (0::'a)
fadd (0::'a) (0::'a) = (0::'a)
associative fadd
commutative fadd
associative fmul
distributive fmul fadd

goal (9 subgoals):
 1. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a. fmul (0::'a) a = (0::'a)
 2. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a. fmul a (0::'a) = (0::'a)
 3. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> fadd (0::'a) (0::'a) = (0::'a)
 4. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)
 5. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> associative fadd
 6. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c. fmul (fmul a b) c = fmul a (fmul b c)
 7. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c. fmul (fadd a b) c = fadd (fmul a c) (fmul b c)
 8. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> \<forall>a b c. fmul c (fadd a b) = fadd (fmul c a) (fmul c b)
 9. (\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d)) \<Longrightarrow> mult_matrix fmul fadd A (mult_matrix fmul fadd B C) = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d); \<forall>a. fmul (0::'a) a = (0::'a); \<forall>a. fmul a (0::'a) = (0::'a); fadd (0::'a) (0::'a) = (0::'a); associative fadd; commutative fadd; associative fmul; distributive fmul fadd\<rbrakk> \<Longrightarrow> \<forall>a b c. fmul (fmul a b) c = fmul a (fmul b c)
 2. \<lbrakk>\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d); \<forall>a. fmul (0::'a) a = (0::'a); \<forall>a. fmul a (0::'a) = (0::'a); fadd (0::'a) (0::'a) = (0::'a); associative fadd; commutative fadd; associative fmul; distributive fmul fadd\<rbrakk> \<Longrightarrow> \<forall>a b c. fmul (fadd a b) c = fadd (fmul a c) (fmul b c)
 3. \<lbrakk>\<And>a b c d. fadd (fadd a b) (fadd c d) = fadd (fadd a c) (fadd b d); \<forall>a. fmul (0::'a) a = (0::'a); \<forall>a. fmul a (0::'a) = (0::'a); fadd (0::'a) (0::'a) = (0::'a); associative fadd; commutative fadd; associative fmul; distributive fmul fadd\<rbrakk> \<Longrightarrow> \<forall>a b c. fmul c (fadd a b) = fadd (fmul c a) (fmul c b)
[PROOF STEP]
apply (simp_all add: associative_def distributive_def l_distributive_def r_distributive_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
mult_matrix fmul fadd (mult_matrix fmul fadd A B) C = mult_matrix fmul fadd A (mult_matrix fmul fadd B C)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ceiling_mono: "x \<ge> y \<Longrightarrow> \<lceil>x\<rceil> \<ge> \<lceil>y\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<le> x \<Longrightarrow> \<lceil>y\<rceil> \<le> \<lceil>x\<rceil>
[PROOF STEP]
unfolding ceiling_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<le> x \<Longrightarrow> - \<lfloor>- y\<rfloor> \<le> - \<lfloor>- x\<rfloor>
[PROOF STEP]
by (simp add: floor_mono)


[STATEMENT]
lemma arg_cnj_pi:
  assumes "Arg z = pi"
  shows "Arg (cnj z) = pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Arg (cnj z) = pi
[PROOF STEP]
using arg_pi_iff assms
[PROOF STATE]
proof (prove)
using this:
(Arg ?z = pi) = (is_real ?z \<and> Re ?z < 0)
Arg z = pi

goal (1 subgoal):
 1. Arg (cnj z) = pi
[PROOF STEP]
by auto


[STATEMENT]
lemma hmem_shift_iff: "\<langle>m, y\<rangle> \<^bold>\<in> shift f delta \<longleftrightarrow> (\<exists>n. m = delta @+ n \<and> \<langle>n, y\<rangle> \<^bold>\<in> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<langle>m, y\<rangle> \<^bold>\<in> shift f delta) = (\<exists>n. m = delta @+ n \<and> \<langle>n, y\<rangle> \<^bold>\<in> f)
[PROOF STEP]
by (auto simp: shift_def hrelation_def is_hpair_def)


[STATEMENT]
lemma polymul[simp]: "Ipoly bs (p *\<^sub>p q) = Ipoly bs p * Ipoly bs q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lparr>p *\<^sub>p q\<rparr>\<^sub>p\<^bsup>bs\<^esup> = \<lparr>p\<rparr>\<^sub>p\<^bsup>bs\<^esup> * \<lparr>q\<rparr>\<^sub>p\<^bsup>bs\<^esup>
[PROOF STEP]
by (induct p q rule: polymul.induct) (auto simp add: field_simps)


[STATEMENT]
lemma interchange_columns_code [code abstract]:
  "vec_nth (interchange_columns_row A n m i) = (%j.  if j = n then A $ i $ m else if j = m then A $ i $ n else A $ i $ j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (interchange_columns_row A n m i) = (\<lambda>j. if j = n then A $ i $ m else if j = m then A $ i $ n else A $ i $ j)
[PROOF STEP]
unfolding interchange_columns_row_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>j. if j = n then A $ i $ m else if j = m then A $ i $ n else A $ i $ j) = (\<lambda>j. if j = n then A $ i $ m else if j = m then A $ i $ n else A $ i $ j)
[PROOF STEP]
by auto


[STATEMENT]
lemma hypnat_add_diff_inverse: "\<And>m n::hypnat. \<not> m < n \<Longrightarrow> n + (m - n) = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m n. \<not> m < n \<Longrightarrow> n + (m - n) = m
[PROOF STEP]
by transfer (rule add_diff_inverse)


[STATEMENT]
lemma length_nat: "length (nat_to_bv n) = length_nat n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (nat_to_bv n) = length_nat n
[PROOF STEP]
apply (simp add: length_nat_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (nat_to_bv n) = (LEAST na. n < 2 ^ na)
[PROOF STEP]
apply (rule Least_equality [symmetric])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. n < 2 ^ length (nat_to_bv n)
 2. \<And>y. n < 2 ^ y \<Longrightarrow> length (nat_to_bv n) \<le> y
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>y. n < 2 ^ y \<Longrightarrow> length (nat_to_bv n) \<le> y
 2. n < 2 ^ length (nat_to_bv n)
[PROOF STEP]
apply (rule length_nat_to_bv_upper_limit)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>y. n < 2 ^ y \<Longrightarrow> n \<le> 2 ^ y - 1
 2. n < 2 ^ length (nat_to_bv n)
[PROOF STEP]
apply arith
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < 2 ^ length (nat_to_bv n)
[PROOF STEP]
apply (rule ccontr)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> n < 2 ^ length (nat_to_bv n) \<Longrightarrow> False
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> n < 2 ^ length (nat_to_bv n) \<Longrightarrow> False
[PROOF STEP]
assume "~ n < 2 ^ length (nat_to_bv n)"
[PROOF STATE]
proof (state)
this:
\<not> n < 2 ^ length (nat_to_bv n)

goal (1 subgoal):
 1. \<not> n < 2 ^ length (nat_to_bv n) \<Longrightarrow> False
[PROOF STEP]
hence "2 ^ length (nat_to_bv n) \<le> n"
[PROOF STATE]
proof (prove)
using this:
\<not> n < 2 ^ length (nat_to_bv n)

goal (1 subgoal):
 1. 2 ^ length (nat_to_bv n) \<le> n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
2 ^ length (nat_to_bv n) \<le> n

goal (1 subgoal):
 1. \<not> n < 2 ^ length (nat_to_bv n) \<Longrightarrow> False
[PROOF STEP]
hence "length (nat_to_bv n) < length (nat_to_bv n)"
[PROOF STATE]
proof (prove)
using this:
2 ^ length (nat_to_bv n) \<le> n

goal (1 subgoal):
 1. length (nat_to_bv n) < length (nat_to_bv n)
[PROOF STEP]
by (rule length_nat_to_bv_lower_limit)
[PROOF STATE]
proof (state)
this:
length (nat_to_bv n) < length (nat_to_bv n)

goal (1 subgoal):
 1. \<not> n < 2 ^ length (nat_to_bv n) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
length (nat_to_bv n) < length (nat_to_bv n)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in ceuclidean_space) norm_CBasis[simp]: "u \<in> CBasis \<Longrightarrow> norm u = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<in> CBasis \<Longrightarrow> norm u = 1
[PROOF STEP]
unfolding norm_eq_sqrt_cinner
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<in> CBasis \<Longrightarrow> sqrt (cmod (u \<bullet>\<^sub>C u)) = 1
[PROOF STEP]
by (simp add: cinner_CBasis)


[STATEMENT]
lemma parAssoc:
  fixes P :: pi
  and   Q :: pi
  and   R :: pi

  shows "(P \<parallel> Q) \<parallel> R \<simeq> P \<parallel> (Q \<parallel> R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P \<parallel> Q) \<parallel> R \<simeq> P \<parallel> Q \<parallel> R
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (P \<parallel> Q) \<parallel> R \<simeq> P \<parallel> Q \<parallel> R
[PROOF STEP]
have "(P \<parallel> Q) \<parallel> R \<sim> P \<parallel> (Q \<parallel> R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P \<parallel> Q) \<parallel> R \<sim> P \<parallel> Q \<parallel> R
[PROOF STEP]
by(rule Strong_Late_Bisim_SC.parAssoc)
[PROOF STATE]
proof (state)
this:
(P \<parallel> Q) \<parallel> R \<sim> P \<parallel> Q \<parallel> R

goal (1 subgoal):
 1. (P \<parallel> Q) \<parallel> R \<simeq> P \<parallel> Q \<parallel> R
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(P \<parallel> Q) \<parallel> R \<sim> P \<parallel> Q \<parallel> R

goal (1 subgoal):
 1. (P \<parallel> Q) \<parallel> R \<simeq> P \<parallel> Q \<parallel> R
[PROOF STEP]
by(rule strongBisimWeakEq)
[PROOF STATE]
proof (state)
this:
(P \<parallel> Q) \<parallel> R \<simeq> P \<parallel> Q \<parallel> R

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma compare_pow_less_iff: "p > 0 \<Longrightarrow> (x :: 'a) \<ge> 0 \<Longrightarrow> y \<ge> 0 \<Longrightarrow> (x ^ p < y ^ p) = (x < y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < p; (0::'a) \<le> x; (0::'a) \<le> y\<rbrakk> \<Longrightarrow> (x ^ p < y ^ p) = (x < y)
[PROOF STEP]
using compare_pow_le_iff [of p x y]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < p; (0::'a) \<le> x; (0::'a) \<le> y\<rbrakk> \<Longrightarrow> (x ^ p \<le> y ^ p) = (x \<le> y)

goal (1 subgoal):
 1. \<lbrakk>0 < p; (0::'a) \<le> x; (0::'a) \<le> y\<rbrakk> \<Longrightarrow> (x ^ p < y ^ p) = (x < y)
[PROOF STEP]
using local.dual_order.order_iff_strict local.power_strict_mono
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < p; (0::'a) \<le> x; (0::'a) \<le> y\<rbrakk> \<Longrightarrow> (x ^ p \<le> y ^ p) = (x \<le> y)
(?b \<le> ?a) = (?b < ?a \<or> ?a = ?b)
\<lbrakk>?a < ?b; (0::'a) \<le> ?a; 0 < ?n\<rbrakk> \<Longrightarrow> ?a ^ ?n < ?b ^ ?n

goal (1 subgoal):
 1. \<lbrakk>0 < p; (0::'a) \<le> x; (0::'a) \<le> y\<rbrakk> \<Longrightarrow> (x ^ p < y ^ p) = (x < y)
[PROOF STEP]
by blast


[STATEMENT]
lemma weight_fun_leq_imp_lp_leq: "\<And>x.
  (increasing f)
  \<Longrightarrow> (increasing g)
  \<Longrightarrow> (\<forall>y. ListMem y l \<longrightarrow> w1 y \<le> w2 y)
  \<Longrightarrow> (w1 x \<le> w2 x)
  \<Longrightarrow> (wlp R w1 g f x l \<le> wlp R w2 g f x l)
"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>increasing f; increasing g; \<forall>y. ListMem y l \<longrightarrow> w1 y \<le> w2 y; w1 x \<le> w2 x\<rbrakk> \<Longrightarrow> wlp R w1 g f x l \<le> wlp R w2 g f x l
[PROOF STEP]
unfolding increasing_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>e b c d. e \<le> c \<and> b \<le> d \<longrightarrow> f e b \<le> f c d; \<forall>e b c d. e \<le> c \<and> b \<le> d \<longrightarrow> g e b \<le> g c d; \<forall>y. ListMem y l \<longrightarrow> w1 y \<le> w2 y; w1 x \<le> w2 x\<rbrakk> \<Longrightarrow> wlp R w1 g f x l \<le> wlp R w2 g f x l
[PROOF STEP]
by (induction l) (auto simp add: elem insert)

\<comment> \<open>NOTE generalizing `f2`, `x1`, `x2` seems to break the prover.\<close>


[STATEMENT]
lemma lower_asymptotic_density_lim:
  assumes "(\<lambda>n. card(A \<inter> {..<n})/n) \<longlonglongrightarrow> l"
  shows "lower_asymptotic_density A = l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lower_asymptotic_density A = l
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lower_asymptotic_density A = l
[PROOF STEP]
have "(\<lambda>n. ereal(card(A \<inter> {..<n})/n)) \<longlonglongrightarrow> l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ereal (real (card (A \<inter> {..<n})) / real n)) \<longlonglongrightarrow> ereal l
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. real (card (A \<inter> {..<n})) / real n) \<longlonglongrightarrow> l

goal (1 subgoal):
 1. (\<lambda>n. ereal (real (card (A \<inter> {..<n})) / real n)) \<longlonglongrightarrow> ereal l
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ereal (real (card (A \<inter> {..<n})) / real n)) \<longlonglongrightarrow> ereal l

goal (1 subgoal):
 1. lower_asymptotic_density A = l
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. ereal (real (card (A \<inter> {..<n})) / real n)) \<longlonglongrightarrow> ereal l
[PROOF STEP]
have "liminf (\<lambda>n. card(A \<inter> {..<n})/n) = l"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. ereal (real (card (A \<inter> {..<n})) / real n)) \<longlonglongrightarrow> ereal l

goal (1 subgoal):
 1. liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x)) = ereal l
[PROOF STEP]
using sequentially_bot tendsto_iff_Liminf_eq_Limsup
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. ereal (real (card (A \<inter> {..<n})) / real n)) \<longlonglongrightarrow> ereal l
sequentially \<noteq> \<bottom>
?F \<noteq> \<bottom> \<Longrightarrow> (?f \<longlongrightarrow> ?f0.0) ?F = (Liminf ?F ?f = ?f0.0 \<and> Limsup ?F ?f = ?f0.0)

goal (1 subgoal):
 1. liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x)) = ereal l
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x)) = ereal l

goal (1 subgoal):
 1. lower_asymptotic_density A = l
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x)) = ereal l
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x)) = ereal l

goal (1 subgoal):
 1. lower_asymptotic_density A = l
[PROOF STEP]
unfolding lower_asymptotic_density_def
[PROOF STATE]
proof (prove)
using this:
liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x)) = ereal l

goal (1 subgoal):
 1. real_of_ereal (liminf (\<lambda>x. ereal (real (card (A \<inter> {..<x})) / real x))) = l
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lower_asymptotic_density A = l

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma minus_divide_left [simp]:
  "a \<in> carrier R \<Longrightarrow> b \<in> carrier R \<Longrightarrow> b \<noteq> \<zero> \<Longrightarrow> \<ominus> (a \<oslash> b) = \<ominus> a \<oslash> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier R; b \<in> carrier R; b \<noteq> \<zero>\<rbrakk> \<Longrightarrow> \<ominus> (a \<oslash> b) = \<ominus> a \<oslash> b
[PROOF STEP]
by (simp add: m_div_def l_minus)


[STATEMENT]
lemma tiling_finite:
  assumes "\<And>a. a \<in> A \<Longrightarrow> finite a"
  shows "t \<in> tiling A \<Longrightarrow> finite t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> tiling A \<Longrightarrow> finite t
[PROOF STEP]
apply (induct set: tiling)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. finite {}
 2. \<And>a t. \<lbrakk>a \<in> A; t \<in> tiling A; finite t; a \<inter> t = {}\<rbrakk> \<Longrightarrow> finite (a \<union> t)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?a \<in> A \<Longrightarrow> finite ?a

goal (2 subgoals):
 1. finite {}
 2. \<And>a t. \<lbrakk>a \<in> A; t \<in> tiling A; finite t; a \<inter> t = {}\<rbrakk> \<Longrightarrow> finite (a \<union> t)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cindexP_lineE_polyE:
  fixes p::"complex poly" and a b::complex
  defines "pp \<equiv> pcompose p [:a, b-a:]"
  defines "pR \<equiv> map_poly Re pp"
      and "pI \<equiv> map_poly Im pp"
    shows "cindexP_lineE p a b = cindex_polyE 0 1 pI pR"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
have "cindexP_lineE p a b = cindexE 0 1
           (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) /
                Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexP_lineE p a b = cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)))
[PROOF STEP]
unfolding cindexP_lineE_def cindexP_pathE_def cindex_pathE_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 (\<lambda>t. Im ((poly p \<circ> linepath a b) t - 0) / Re ((poly p \<circ> linepath a b) t - 0)) = cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)))
[PROOF STEP]
by (simp add:poly_linepath_comp')
[PROOF STATE]
proof (state)
this:
cindexP_lineE p a b = cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)))

goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindexP_lineE p a b = cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)))

goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
have "... = cindexE 0 1 (\<lambda>t. poly pI t/poly pR t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t))) = cindexE 0 1 (\<lambda>t. poly pI t / poly pR t)
[PROOF STEP]
unfolding pI_def pR_def pp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t))) = cindexE 0 1 (\<lambda>t. poly (map_poly Im (p \<circ>\<^sub>p [:a, b - a:])) t / poly (map_poly Re (p \<circ>\<^sub>p [:a, b - a:])) t)
[PROOF STEP]
by (simp add:Im_poly_of_real Re_poly_of_real)
[PROOF STATE]
proof (state)
this:
cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t))) = cindexE 0 1 (\<lambda>t. poly pI t / poly pR t)

goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindexE 0 1 (\<lambda>t. Im (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t)) / Re (poly (p \<circ>\<^sub>p [:a, b - a:]) (complex_of_real t))) = cindexE 0 1 (\<lambda>t. poly pI t / poly pR t)

goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
have "... = cindex_polyE 0 1 pI pR"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 (\<lambda>t. poly pI t / poly pR t) = cindex_polyE 0 1 pI pR
[PROOF STEP]
apply (subst cindexE_eq_cindex_polyE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 0 < 1
 2. cindex_polyE 0 1 pI pR = cindex_polyE 0 1 pI pR
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
cindexE 0 1 (\<lambda>t. poly pI t / poly pR t) = cindex_polyE 0 1 pI pR

goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cindexP_lineE p a b = cindex_polyE 0 1 pI pR

goal (1 subgoal):
 1. cindexP_lineE p a b = cindex_polyE 0 1 pI pR
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindexP_lineE p a b = cindex_polyE 0 1 pI pR

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem HInit_HInv3: "HInit s \<Longrightarrow> HInv3 s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. HInit s \<Longrightarrow> HInv3 s
[PROOF STEP]
by(simp add: HInit_def Init_def HInv3_def
               HInv3_inner_def HInv3_L_def HInv3_R_def)


[STATEMENT]
lemma contour_integrable_diff:
    "\<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x - f2 x) contour_integrable_on g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x - f2 x) contour_integrable_on g
[PROOF STEP]
using has_contour_integral_diff contour_integrable_on_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(?f1.0 has_contour_integral ?i1.0) ?g; (?f2.0 has_contour_integral ?i2.0) ?g\<rbrakk> \<Longrightarrow> ((\<lambda>x. ?f1.0 x - ?f2.0 x) has_contour_integral ?i1.0 - ?i2.0) ?g
?f contour_integrable_on ?g \<equiv> \<exists>i. (?f has_contour_integral i) ?g

goal (1 subgoal):
 1. \<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x - f2 x) contour_integrable_on g
[PROOF STEP]
by fastforce


[STATEMENT]
lemma iterated_serial_on_linear: "iterated_serial_on A r x (n+m) = iterated_serial_on A r (iterated_serial_on A r x n) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. iterated_serial_on A r x (n + m) = iterated_serial_on A r (iterated_serial_on A r x n) m
[PROOF STEP]
by (induction m) auto


[STATEMENT]
lemma moebius_rotation_inv_rotation [simp]:
  shows "moebius_pt (moebius_rotation \<phi>) (moebius_pt (moebius_rotation (-\<phi>)) z) = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (moebius_rotation \<phi>) (moebius_pt (moebius_rotation (- \<phi>)) z) = z
[PROOF STEP]
using moebius_rotation_inv[symmetric, of \<phi>]
[PROOF STATE]
proof (prove)
using this:
moebius_rotation (- \<phi>) = moebius_inv (moebius_rotation \<phi>)

goal (1 subgoal):
 1. moebius_pt (moebius_rotation \<phi>) (moebius_pt (moebius_rotation (- \<phi>)) z) = z
[PROOF STEP]
by (simp del: moebius_rotation_inv)


[STATEMENT]
lemma homotopic_with_imp_subset2:
     "homotopic_with_canon P X Y f g \<Longrightarrow> g ` X \<subseteq> Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_with_canon P X Y f g \<Longrightarrow> g ` X \<subseteq> Y
[PROOF STEP]
by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one)


[STATEMENT]
lemma sets_borel: "sets borel = sigma_sets UNIV {S. open S}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets borel = sigma_sets UNIV {S. open S}
[PROOF STEP]
unfolding borel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (sigma UNIV (Collect open)) = sigma_sets UNIV {S. open S}
[PROOF STEP]
by (rule sets_measure_of) simp


[STATEMENT]
lemma convex_cone:
  assumes C: "C \<subseteq> carrier_vec n"
  shows "convex (cone C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex (cone C)
[PROOF STEP]
unfolding convex_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex_hull (cone C) = cone C
[PROOF STEP]
using convex_hull_in_cone set_in_convex_hull[OF cone_carrier[OF C]] cone_cone[OF C]
[PROOF STATE]
proof (prove)
using this:
convex_hull ?C \<subseteq> cone ?C
cone C \<subseteq> convex_hull (cone C)
cone (cone C) = cone C

goal (1 subgoal):
 1. convex_hull (cone C) = cone C
[PROOF STEP]
by blast


[STATEMENT]
lemma has_prod_split_initial_segment:
  assumes "f has_prod a" "\<And>i. i < n \<Longrightarrow> f i \<noteq> 0"
  shows "(\<lambda>i. f (i + n)) has_prod (a / (\<Prod>i<n. f i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. f (i + n)) has_prod (a / prod f {..<n})
[PROOF STEP]
using assms has_prod_iff_shift'
[PROOF STATE]
proof (prove)
using this:
f has_prod a
?i < n \<Longrightarrow> f ?i \<noteq> (0::'a)
(\<And>i. i < ?n \<Longrightarrow> f i \<noteq> (0::'a)) \<Longrightarrow> (\<lambda>i. f (i + ?n)) has_prod (?a / prod f {..<?n}) = f has_prod ?a

goal (1 subgoal):
 1. (\<lambda>i. f (i + n)) has_prod (a / prod f {..<n})
[PROOF STEP]
by blast


[STATEMENT]
lemma UNIV_atMost:
  "(UNIV::'a atMost set) = Abs_atMost ` {..<LENGTH('a::len)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV = Abs_atMost ` {..<LENGTH('a)}
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> Abs_atMost ` {..<LENGTH('a)}
[PROOF STEP]
apply (rule Abs_atMost_induct)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. y \<in> {..<LENGTH('a)} \<Longrightarrow> Abs_atMost y \<in> Abs_atMost ` {..<LENGTH('a)}
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma uniqAppend:
  assumes "uniq (l1 @ l2)"
  shows "uniq l1" "uniq l2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uniq l1 &&& uniq l2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
uniq (l1 @ l2)

goal (1 subgoal):
 1. uniq l1 &&& uniq l2
[PROOF STEP]
by (induct l1) auto


[STATEMENT]
theorem hoare_relative_complete: "\<Turnstile> {P}c{Q}  \<Longrightarrow>  \<turnstile> {P}c{Q}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Turnstile> {P} c {Q} \<Longrightarrow> \<turnstile> {P} c {Q}
[PROOF STEP]
apply (rule strengthen_pre[OF _ wp_is_pre])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Turnstile> {P} c {Q} \<Longrightarrow> \<forall>s. P s \<longrightarrow> wp c Q s
[PROOF STEP]
apply(unfold hoare_valid_def wp_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>s t. s -c\<rightarrow> t \<longrightarrow> P s \<longrightarrow> Q t \<Longrightarrow> \<forall>s. P s \<longrightarrow> (\<forall>t. s -c\<rightarrow> t \<longrightarrow> Q t)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inj_onTr1:"\<lbrakk>inj_on f A; x \<in> A; y \<in> A; f x = f y\<rbrakk>  \<Longrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>inj_on f A; x \<in> A; y \<in> A; f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
apply (simp add:inj_on_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma is_rcoset_replistD_distinct :
  "is_rcoset_replist H gs \<Longrightarrow> distinct (map (\<lambda>g. (rcoset_rel H)``{g}) gs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_rcoset_replist H gs \<Longrightarrow> distinct (map (\<lambda>g. rcoset_rel H `` {g}) gs)
[PROOF STEP]
unfolding is_rcoset_replist_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set gs \<subseteq> G \<and> distinct (map (\<lambda>g. rcoset_rel H `` {g}) gs) \<and> G = (\<Union>g\<in>set gs. rcoset_rel H `` {g}) \<Longrightarrow> distinct (map (\<lambda>g. rcoset_rel H `` {g}) gs)
[PROOF STEP]
by fast


[STATEMENT]
lemma moebius_mu_formula_real: "(moebius_mu n :: real) = dirichlet_inverse (\<lambda>_. 1) 1 n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
have "moebius_mu n = (fds_nth (fds moebius_mu) n :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_mu n = fds_nth (fds moebius_mu) n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
moebius_mu n = fds_nth (fds moebius_mu) n

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
moebius_mu n = fds_nth (fds moebius_mu) n

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
have "fds moebius_mu = (inverse fds_zeta :: real fds)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds moebius_mu = inverse fds_zeta
[PROOF STEP]
by (fact fds_moebius_inverse_zeta)
[PROOF STATE]
proof (state)
this:
fds moebius_mu = inverse fds_zeta

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds moebius_mu = inverse fds_zeta

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
have "fds_nth \<dots> n = dirichlet_inverse (fds_nth fds_zeta) 1 n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (inverse fds_zeta) n = dirichlet_inverse (fds_nth fds_zeta) 1 n
[PROOF STEP]
unfolding fds_nth_inverse
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dirichlet_inverse (fds_nth fds_zeta) (inverse (fds_nth fds_zeta 1)) n = dirichlet_inverse (fds_nth fds_zeta) 1 n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fds_nth (inverse fds_zeta) n = dirichlet_inverse (fds_nth fds_zeta) 1 n

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_nth (inverse fds_zeta) n = dirichlet_inverse (fds_nth fds_zeta) 1 n

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
have "\<dots> = dirichlet_inverse (\<lambda>_. 1) 1 n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dirichlet_inverse (fds_nth fds_zeta) 1 n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
by (rule dirichlet_inverse_cong) simp_all
[PROOF STATE]
proof (state)
this:
dirichlet_inverse (fds_nth fds_zeta) 1 n = dirichlet_inverse (\<lambda>_. 1) 1 n

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n

goal (1 subgoal):
 1. moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
moebius_mu n = dirichlet_inverse (\<lambda>_. 1) 1 n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eventually_False_at_top_linorder [simp]:
  "eventually (\<lambda>_::_::linorder. False) at_top \<longleftrightarrow> False"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>\<^sub>F _ in at_top. False) = False
[PROOF STEP]
unfolding eventually_at_top_linorder
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>N. \<forall>n\<ge>N. False) = False
[PROOF STEP]
by force


[STATEMENT]
lemma assemble_distinguishing_sequence_from_ofsm_table_sym :
  assumes "observable M"
  and     "q1 \<in> states M"
  and     "q2 \<in> states M"
  and     "ofsm_table M (\<lambda>q . states M)  k q1 \<noteq> ofsm_table M (\<lambda>q . states M)  k q2"
shows "assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k
[PROOF STEP]
using assms(2,3,4)
[PROOF STATE]
proof (prove)
using this:
q1 \<in> FSM.states M
q2 \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k
[PROOF STEP]
proof (induction k arbitrary: q1 q2)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) 0 q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) 0 q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 0 = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 0
 2. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
q1 \<in> FSM.states M
q2 \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) 0 q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) 0 q2

goal (2 subgoals):
 1. \<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) 0 q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) 0 q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 0 = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 0
 2. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
q1 \<in> FSM.states M
q2 \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) 0 q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) 0 q2
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
q1 \<in> FSM.states M
q2 \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) 0 q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) 0 q2

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 0 = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 0 = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 0

goal (1 subgoal):
 1. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?q1.0 \<in> FSM.states M; ?q2.0 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k ?q1.0 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2.0\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M ?q1.0 ?q2.0 k = assemble_distinguishing_sequence_from_ofsm_table M ?q2.0 ?q1.0 k
q1 \<in> FSM.states M
q2 \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2

goal (1 subgoal):
 1. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
obtain xy a b where "select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy,(a,b))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>xy a b. select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prod_cases3
[PROOF STATE]
proof (prove)
using this:
(\<And>a b c. ?y = (a, b, c) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>xy a b. select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b)

goal (1 subgoal):
 1. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b)
[PROOF STEP]
have "select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy,(b, a))"
[PROOF STATE]
proof (prove)
using this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b)

goal (1 subgoal):
 1. select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, b, a)
[PROOF STEP]
using select_diverging_ofsm_table_io_sym[OF assms(1) Suc.prems]
[PROOF STATE]
proof (prove)
using this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b)
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (?io, ?a, ?b) \<Longrightarrow> select_diverging_ofsm_table_io M q2 q1 (Suc k) = (?io, ?b, ?a)

goal (1 subgoal):
 1. select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, b, a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, b, a)

goal (1 subgoal):
 1. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
consider "\<exists> q1' q2' . a = Some q1' \<and> b = Some q2'" | "a = None \<or> b = None"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> thesis; a = None \<or> b = None \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using option.exhaust_sel
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?option = None \<Longrightarrow> ?P; ?option = Some (the ?option) \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. \<lbrakk>\<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> thesis; a = None \<or> b = None \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> ?thesis; a = None \<or> b = None \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>k q1 q2. \<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 k = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 k; q1 \<in> FSM.states M; q2 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q1 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) (Suc k) q2\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> ?thesis; a = None \<or> b = None \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> ?thesis; a = None \<or> b = None \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
\<exists>q1' q2'. a = Some q1' \<and> b = Some q2'

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>q1' q2'. a = Some q1' \<and> b = Some q2'
[PROOF STEP]
obtain q1' q2' where "select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy,(Some q1', Some q2'))"
[PROOF STATE]
proof (prove)
using this:
\<exists>q1' q2'. a = Some q1' \<and> b = Some q2'

goal (1 subgoal):
 1. (\<And>q1' q2'. select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2') \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy,(a,b))\<close>
[PROOF STATE]
proof (prove)
using this:
\<exists>q1' q2'. a = Some q1' \<and> b = Some q2'
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, a, b)

goal (1 subgoal):
 1. (\<And>q1' q2'. select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2') \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2')

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2')
[PROOF STEP]
have "select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy,(Some q2', Some q1'))"
[PROOF STATE]
proof (prove)
using this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2')

goal (1 subgoal):
 1. select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, Some q2', Some q1')
[PROOF STEP]
using select_diverging_ofsm_table_io_sym[OF assms(1) Suc.prems]
[PROOF STATE]
proof (prove)
using this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2')
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (?io, ?a, ?b) \<Longrightarrow> select_diverging_ofsm_table_io M q2 q1 (Suc k) = (?io, ?b, ?a)

goal (1 subgoal):
 1. select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, Some q2', Some q1')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, Some q2', Some q1')

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
obtain x y where "select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x,y),(h_obs M q1 x y, h_obs M q2 x y))"
                 and "\<And> q1' q2' . h_obs M q1 x y = Some q1' \<Longrightarrow> h_obs M q2 x y = Some q2' \<Longrightarrow> ofsm_table M (\<lambda>q . states M)  k q1' \<noteq> ofsm_table M (\<lambda>q . states M)  k q2'"
                 and "h_obs M q1 x y \<noteq> None \<or> h_obs M q2 x y \<noteq> None"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y); \<And>q1' q2'. \<lbrakk>FSM.h_obs M q1 x y = Some q1'; FSM.h_obs M q2 x y = Some q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'; FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using select_diverging_ofsm_table_io_Some(1)[OF assms(1) Suc.prems]
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. \<lbrakk>select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y); \<And>q1' q2'. \<lbrakk>FSM.h_obs M q1 x y = Some q1'; FSM.h_obs M q2 x y = Some q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'; FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y); \<And>q1' q2'. \<lbrakk>FSM.h_obs M q1 x y = Some q1'; FSM.h_obs M q2 x y = Some q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'; FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y)
\<lbrakk>FSM.h_obs M q1 x y = Some ?q1'; FSM.h_obs M q2 x y = Some ?q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k ?q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2'
FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y)
\<lbrakk>FSM.h_obs M q1 x y = Some ?q1'; FSM.h_obs M q2 x y = Some ?q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k ?q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2'
FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None
[PROOF STEP]
have "xy = (x,y)" and "h_obs M q1 x y = Some q1'" and "h_obs M q2 x y = Some q2'"
[PROOF STATE]
proof (prove)
using this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y)
\<lbrakk>FSM.h_obs M q1 x y = Some ?q1'; FSM.h_obs M q2 x y = Some ?q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k ?q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2'
FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None

goal (1 subgoal):
 1. xy = (x, y) &&& FSM.h_obs M q1 x y = Some q1' &&& FSM.h_obs M q2 x y = Some q2'
[PROOF STEP]
using \<open>select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy,(Some q1', Some q2'))\<close>
[PROOF STATE]
proof (prove)
using this:
select_diverging_ofsm_table_io M q1 q2 (Suc k) = ((x, y), FSM.h_obs M q1 x y, FSM.h_obs M q2 x y)
\<lbrakk>FSM.h_obs M q1 x y = Some ?q1'; FSM.h_obs M q2 x y = Some ?q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k ?q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2'
FSM.h_obs M q1 x y \<noteq> None \<or> FSM.h_obs M q2 x y \<noteq> None
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2')

goal (1 subgoal):
 1. xy = (x, y) &&& FSM.h_obs M q1 x y = Some q1' &&& FSM.h_obs M q2 x y = Some q2'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xy = (x, y)
FSM.h_obs M q1 x y = Some q1'
FSM.h_obs M q2 x y = Some q2'

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xy = (x, y)
FSM.h_obs M q1 x y = Some q1'
FSM.h_obs M q2 x y = Some q2'
[PROOF STEP]
have "q1' \<in> states M" and "q2' \<in> states M"
[PROOF STATE]
proof (prove)
using this:
xy = (x, y)
FSM.h_obs M q1 x y = Some q1'
FSM.h_obs M q2 x y = Some q2'

goal (1 subgoal):
 1. q1' \<in> FSM.states M &&& q2' \<in> FSM.states M
[PROOF STEP]
unfolding h_obs_Some[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
xy = (x, y)
{q'. (q1, x, y, q') \<in> FSM.transitions M} = {q1'}
{q'. (q2, x, y, q') \<in> FSM.transitions M} = {q2'}

goal (1 subgoal):
 1. q1' \<in> FSM.states M &&& q2' \<in> FSM.states M
[PROOF STEP]
using fsm_transition_target
[PROOF STATE]
proof (prove)
using this:
xy = (x, y)
{q'. (q1, x, y, q') \<in> FSM.transitions M} = {q1'}
{q'. (q2, x, y, q') \<in> FSM.transitions M} = {q2'}
?t \<in> FSM.transitions ?M \<Longrightarrow> t_target ?t \<in> FSM.states ?M

goal (1 subgoal):
 1. q1' \<in> FSM.states M &&& q2' \<in> FSM.states M
[PROOF STEP]
by fastforce+
[PROOF STATE]
proof (state)
this:
q1' \<in> FSM.states M
q2' \<in> FSM.states M

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
q1' \<in> FSM.states M
q2' \<in> FSM.states M

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
have "ofsm_table M (\<lambda>q . states M)  k q1' \<noteq> ofsm_table M (\<lambda>q . states M)  k q2'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'
[PROOF STEP]
using \<open>h_obs M q1 x y = Some q1'\<close> \<open>h_obs M q2 x y = Some q2'\<close> \<open>\<And> q1' q2' . h_obs M q1 x y = Some q1' \<Longrightarrow> h_obs M q2 x y = Some q2' \<Longrightarrow> ofsm_table M (\<lambda>q . states M)  k q1' \<noteq> ofsm_table M (\<lambda>q . states M)  k q2'\<close>
[PROOF STATE]
proof (prove)
using this:
FSM.h_obs M q1 x y = Some q1'
FSM.h_obs M q2 x y = Some q2'
\<lbrakk>FSM.h_obs M q1 x y = Some ?q1'; FSM.h_obs M q2 x y = Some ?q2'\<rbrakk> \<Longrightarrow> ofsm_table M (\<lambda>q. FSM.states M) k ?q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2'

goal (1 subgoal):
 1. ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
q1' \<in> FSM.states M
q2' \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'
[PROOF STEP]
have "assemble_distinguishing_sequence_from_ofsm_table M  q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M  q2' q1' k"
[PROOF STATE]
proof (prove)
using this:
q1' \<in> FSM.states M
q2' \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M q2' q1' k
[PROOF STEP]
using Suc.IH
[PROOF STATE]
proof (prove)
using this:
q1' \<in> FSM.states M
q2' \<in> FSM.states M
ofsm_table M (\<lambda>q. FSM.states M) k q1' \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k q2'
\<lbrakk>?q1.0 \<in> FSM.states M; ?q2.0 \<in> FSM.states M; ofsm_table M (\<lambda>q. FSM.states M) k ?q1.0 \<noteq> ofsm_table M (\<lambda>q. FSM.states M) k ?q2.0\<rbrakk> \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M ?q1.0 ?q2.0 k = assemble_distinguishing_sequence_from_ofsm_table M ?q2.0 ?q1.0 k

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M q2' q1' k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M q2' q1' k

goal (2 subgoals):
 1. \<exists>q1' q2'. a = Some q1' \<and> b = Some q2' \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
 2. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
assemble_distinguishing_sequence_from_ofsm_table M q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M q2' q1' k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
assemble_distinguishing_sequence_from_ofsm_table M q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M q2' q1' k

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
using \<open>select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy,(Some q1', Some q2'))\<close>
            \<open>select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy,(Some q2', Some q1'))\<close>
[PROOF STATE]
proof (prove)
using this:
assemble_distinguishing_sequence_from_ofsm_table M q1' q2' k = assemble_distinguishing_sequence_from_ofsm_table M q2' q1' k
select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy, Some q1', Some q2')
select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy, Some q2', Some q1')

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
a = None \<or> b = None

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
obtain x y where "xy = (x,y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x y. xy = (x, y) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prod.exhaust
[PROOF STATE]
proof (prove)
using this:
(\<And>x1 x2. ?y = (x1, x2) \<Longrightarrow> ?P) \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>x y. xy = (x, y) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
xy = (x, y)

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
have helper: "\<And> f f1 f2 .(case ((x,y),(a,b)) of ((x,y),(Some a',Some b')) \<Rightarrow> f1 x y a' b' | ((x,y),_) \<Rightarrow> f2 x y) = f2 x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f f1 f2. (case ((x, y), a, b) of ((x, y), None, b) \<Rightarrow> f2 x y | ((x, y), Some a', None) \<Rightarrow> f2 x y | ((x, y), Some a', Some b') \<Rightarrow> f1 x y a' b') = f2 x y
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
a = None \<or> b = None

goal (1 subgoal):
 1. \<And>f f1 f2. (case ((x, y), a, b) of ((x, y), None, b) \<Rightarrow> f2 x y | ((x, y), Some a', None) \<Rightarrow> f2 x y | ((x, y), Some a', Some b') \<Rightarrow> f1 x y a' b') = f2 x y
[PROOF STEP]
by (metis case_prod_conv option.case_eq_if)
[PROOF STATE]
proof (state)
this:
(case ((x, y), a, b) of ((x, y), None, b) \<Rightarrow> ?f2.0 x y | ((x, y), Some a', None) \<Rightarrow> ?f2.0 x y | ((x, y), Some a', Some b') \<Rightarrow> ?f1.0 x y a' b') = ?f2.0 x y

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
have helper2: "\<And> f f1 f2 .(case ((x,y),(b,a)) of ((x,y),(Some a',Some b')) \<Rightarrow> f1 x y a' b' | ((x,y),_) \<Rightarrow> f2 x y) = f2 x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f f1 f2. (case ((x, y), b, a) of ((x, y), None, b) \<Rightarrow> f2 x y | ((x, y), Some a', None) \<Rightarrow> f2 x y | ((x, y), Some a', Some b') \<Rightarrow> f1 x y a' b') = f2 x y
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
a = None \<or> b = None

goal (1 subgoal):
 1. \<And>f f1 f2. (case ((x, y), b, a) of ((x, y), None, b) \<Rightarrow> f2 x y | ((x, y), Some a', None) \<Rightarrow> f2 x y | ((x, y), Some a', Some b') \<Rightarrow> f1 x y a' b') = f2 x y
[PROOF STEP]
by (metis case_prod_conv option.case_eq_if)
[PROOF STATE]
proof (state)
this:
(case ((x, y), b, a) of ((x, y), None, b) \<Rightarrow> ?f2.1 x y | ((x, y), Some a', None) \<Rightarrow> ?f2.1 x y | ((x, y), Some a', Some b') \<Rightarrow> ?f1.1 x y a' b') = ?f2.1 x y

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
have "assemble_distinguishing_sequence_from_ofsm_table M  q1 q2 (Suc k) = [xy]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = [xy]
[PROOF STEP]
unfolding assemble_distinguishing_sequence_from_ofsm_table.simps
                \<open>select_diverging_ofsm_table_io M q1 q2 (Suc k) = (xy,(a, b))\<close>  \<open>xy = (x,y)\<close> helper
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(x, y)] = [(x, y)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = [xy]

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = [xy]

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
have "assemble_distinguishing_sequence_from_ofsm_table M  q2 q1 (Suc k) = [xy]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k) = [xy]
[PROOF STEP]
unfolding assemble_distinguishing_sequence_from_ofsm_table.simps
                \<open>select_diverging_ofsm_table_io M q2 q1 (Suc k) = (xy,(b, a))\<close>  \<open>xy = (x,y)\<close> helper2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(x, y)] = [(x, y)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k) = [xy]

goal (1 subgoal):
 1. a = None \<or> b = None \<Longrightarrow> assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = [xy]
assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k) = [xy]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = [xy]
assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k) = [xy]

goal (1 subgoal):
 1. assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
assemble_distinguishing_sequence_from_ofsm_table M q1 q2 (Suc k) = assemble_distinguishing_sequence_from_ofsm_table M q2 q1 (Suc k)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lift2_option_not_None: "lift2_option f x y \<noteq> None \<longleftrightarrow> (x \<noteq> None \<and> y \<noteq> None)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (lift2_option f x y \<noteq> None) = (x \<noteq> None \<and> y \<noteq> None)
[PROOF STEP]
using lift2_option.elims
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>lift2_option ?x ?xa ?xb = ?y; \<And>uu_ uv_. \<lbrakk>?x = uu_; ?xa = None; ?xb = uv_; ?y = None\<rbrakk> \<Longrightarrow> ?P; \<And>uw_ v. \<lbrakk>?x = uw_; ?xa = Some v; ?xb = None; ?y = None\<rbrakk> \<Longrightarrow> ?P; \<And>f x y. \<lbrakk>?x = f; ?xa = Some x; ?xb = Some y; ?y = Some (f x y)\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (lift2_option f x y \<noteq> None) = (x \<noteq> None \<and> y \<noteq> None)
[PROOF STEP]
by blast


[STATEMENT]
lemma formulas_mono: "S \<subseteq> T \<Longrightarrow> formulas S \<subseteq> formulas T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<subseteq> T \<Longrightarrow> formulas S \<subseteq> formulas T
[PROOF STEP]
by (fast intro!: formulasI elim!: formulasD)


[STATEMENT]
lemma less_mod_ge_imp_div_less: "\<lbrakk> a < (b::nat); a mod m \<ge> b mod m \<rbrakk> \<Longrightarrow> a div m < b div m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < b; b mod m \<le> a mod m\<rbrakk> \<Longrightarrow> a div m < b div m
[PROOF STEP]
apply (case_tac "m = 0", simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < b; b mod m \<le> a mod m; m \<noteq> 0\<rbrakk> \<Longrightarrow> a div m < b div m
[PROOF STEP]
apply (rule mult_less_cancel1[of m, THEN iffD1, THEN conjunct2])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < b; b mod m \<le> a mod m; m \<noteq> 0\<rbrakk> \<Longrightarrow> m * (a div m) < m * (b div m)
[PROOF STEP]
apply (simp add: minus_mod_eq_mult_div [symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < b; b mod m \<le> a mod m; 0 < m\<rbrakk> \<Longrightarrow> a - a mod m < b - b mod m
[PROOF STEP]
apply (rule order_less_le_trans[of _ "b - a mod m"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a < b; b mod m \<le> a mod m; 0 < m\<rbrakk> \<Longrightarrow> a - a mod m < b - a mod m
 2. \<lbrakk>a < b; b mod m \<le> a mod m; 0 < m\<rbrakk> \<Longrightarrow> b - a mod m \<le> b - b mod m
[PROOF STEP]
apply (rule diff_less_mono)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>a < b; b mod m \<le> a mod m; 0 < m\<rbrakk> \<Longrightarrow> a < b
 2. \<lbrakk>a < b; b mod m \<le> a mod m; 0 < m\<rbrakk> \<Longrightarrow> a mod m \<le> a
 3. \<lbrakk>a < b; b mod m \<le> a mod m; 0 < m\<rbrakk> \<Longrightarrow> b - a mod m \<le> b - b mod m
[PROOF STEP]
apply simp+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma set_baliR:
  "set_tree(baliR l a r) = set_tree l \<union> {a} \<union> set_tree r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Tree2.set_tree (baliR l a r) = Tree2.set_tree l \<union> {a} \<union> Tree2.set_tree r
[PROOF STEP]
by(cases "(l,a,r)" rule: baliR.cases) (auto)


[STATEMENT]
lemma mat_extension_unitary:
  assumes "m \<in> carrier_mat d1 d1"
    and "unitary m"
  shows "unitary (mat_extension m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitary (mat_extension m)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
m \<in> carrier_mat d1 d1
unitary m

goal (1 subgoal):
 1. unitary (mat_extension m)
[PROOF STEP]
by (simp add: mat_extension_def tensor_mat_unitary unitary_one)


[STATEMENT]
lemma wf_less_multiset: "wf {(M :: 'a multiset, N). M < N}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(M, N). M < N}
[PROOF STEP]
unfolding less_multiset_def multp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(M, N). (M, N) \<in> mult {(x, y). x < y}}
[PROOF STEP]
by (auto intro: wf_mult wf)


[STATEMENT]
lemma tl_rev_take: "\<lbrakk>0 < ok; ok \<le> length f\<rbrakk> \<Longrightarrow> rev (take ok (x # f)) = tl (rev (take ok f)) @ [x]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < ok; ok \<le> length f\<rbrakk> \<Longrightarrow> rev (take ok (x # f)) = tl (rev (take ok f)) @ [x]
[PROOF STEP]
by(simp add: rev_take Suc_diff_le drop_Suc tl_drop)


[STATEMENT]
lemma bin_narry_equiv: "bin_narry a b c = bin_narry2 a b c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bin_narry a b c = bin_narry2 a b c
[PROOF STEP]
apply (auto simp add: bin_narry_def bin_narry2_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. a mod 2 ^ c < b mod 2 ^ c \<Longrightarrow> Suc 0 = Suc ((2 ^ c + a mod 2 ^ c - b mod 2 ^ c) div 2 ^ c) mod 2
 2. \<not> a mod 2 ^ c < b mod 2 ^ c \<Longrightarrow> Suc ((2 ^ c + a mod 2 ^ c - b mod 2 ^ c) div 2 ^ c) mod 2 = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod 2 ^ c < b mod 2 ^ c \<Longrightarrow> Suc 0 = Suc ((2 ^ c + a mod 2 ^ c - b mod 2 ^ c) div 2 ^ c) mod 2
[PROOF STEP]
by (smt add.commute div_less dvd_0_right even_Suc le_add_diff_inverse2 less_add_eq_less
        mod_greater_zero_iff_not_dvd neq0_conv not_mod2_eq_Suc_0_eq_0 order_le_less zero_less_diff
        zero_less_numeral zero_less_power)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> a mod 2 ^ c < b mod 2 ^ c \<Longrightarrow> Suc ((2 ^ c + a mod 2 ^ c - b mod 2 ^ c) div 2 ^ c) mod 2 = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> a mod 2 ^ c < b mod 2 ^ c \<Longrightarrow> Suc ((2 ^ c + a mod 2 ^ c - b mod 2 ^ c) div 2 ^ c) mod 2 = 0
[PROOF STEP]
by (simp add: le_div_geq less_imp_diff_less)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma is_proper_suffix_eq_suffix: "is_proper_suffix a b = (a \<noteq> b \<and> is_suffix a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_proper_suffix a b = (a \<noteq> b \<and> is_suffix a b)
[PROOF STEP]
by (metis is_proper_suffix_def is_suffix_eq_proper_suffix self_append_conv2)


[STATEMENT]
lemma strict_leq_def:
  "-x < -y \<longleftrightarrow> -x \<le> -y \<and> \<not> (-y \<le> -x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- x < - y) = (- x \<le> - y \<and> \<not> - y \<le> - x)
[PROOF STEP]
by (simp add: sba_dual.sba_dual.sub_less_def sba_dual.sba_dual.sub_less_eq_def)


[STATEMENT]
lemma max_list_vars_fms:
  assumes \<open>max_list (vars_fms A) \<le> n\<close> \<open>p [\<in>] A\<close>
  shows \<open>max_list (vars_fm p) \<le> n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max_list (vars_fm p) \<le> n
[PROOF STEP]
using assms max_list_mono vars_fms_member
[PROOF STATE]
proof (prove)
using this:
max_list (vars_fms A) \<le> n
p [\<in>] A
?A [\<subseteq>] ?B \<Longrightarrow> max_list ?A \<le> max_list ?B
?p [\<in>] ?A \<Longrightarrow> vars_fm ?p [\<subseteq>] vars_fms ?A

goal (1 subgoal):
 1. max_list (vars_fm p) \<le> n
[PROOF STEP]
by (meson dual_order.trans)


[STATEMENT]
lemma DERIV_cong_ev:
  "x = y \<Longrightarrow> eventually (\<lambda>x. f x = g x) (nhds x) \<Longrightarrow> u = v \<Longrightarrow>
    DERIV f x :> u \<longleftrightarrow> DERIV g y :> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x = y; \<forall>\<^sub>F x in nhds x. f x = g x; u = v\<rbrakk> \<Longrightarrow> (f has_field_derivative u) (at x) = (g has_field_derivative v) (at y)
[PROOF STEP]
by (rule has_field_derivative_cong_ev) simp_all


[STATEMENT]
lemma Arg2pi_inverse: "Arg2pi(inverse z) = (if z \<in> \<real> then Arg2pi z else 2*pi - Arg2pi z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
[PROOF STEP]
proof (cases "z=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z = 0 \<Longrightarrow> Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
 2. z \<noteq> 0 \<Longrightarrow> Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
z \<noteq> 0

goal (2 subgoals):
 1. z = 0 \<Longrightarrow> Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
 2. z \<noteq> 0 \<Longrightarrow> Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
[PROOF STEP]
apply (rule Arg2pi_unique [of "inverse (norm z)"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. complex_of_real (inverse (cmod z)) * exp (\<i> * complex_of_real (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)) = inverse z
 2. 0 < inverse (cmod z)
 3. 0 \<le> (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
 4. (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z) < 2 * pi
[PROOF STEP]
using Arg2pi_eq False Arg2pi_ge_0 [of z] Arg2pi_lt_2pi [of z] Arg2pi_eq_0 [of z]
[PROOF STATE]
proof (prove)
using this:
?z = complex_of_real (cmod ?z) * exp (\<i> * complex_of_real (Arg2pi ?z))
z \<noteq> 0
0 \<le> Arg2pi z
Arg2pi z < 2 * pi
(Arg2pi z = 0) = (z \<in> \<real> \<and> 0 \<le> Re z)

goal (4 subgoals):
 1. complex_of_real (inverse (cmod z)) * exp (\<i> * complex_of_real (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)) = inverse z
 2. 0 < inverse (cmod z)
 3. 0 \<le> (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
 4. (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z) < 2 * pi
[PROOF STEP]
by (auto simp: Arg2pi_real in_Reals_norm exp_diff field_simps)
[PROOF STATE]
proof (state)
this:
Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)

goal (1 subgoal):
 1. z = 0 \<Longrightarrow> Arg2pi (inverse z) = (if z \<in> \<real> then Arg2pi z else 2 * pi - Arg2pi z)
[PROOF STEP]
qed auto