[STATEMENT]
lemma free_vars_map_vars[simp]:
  "free_vars (map_vars f e) = f ` free_vars e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. free_vars (map_vars f e) = f ` free_vars e
[PROOF STEP]
proof (induction e arbitrary: f)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
case (CIntegral e t f)
[PROOF STATE]
proof (state)
this:
free_vars (map_vars ?f e) = ?f ` free_vars e

goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
free_vars (map_vars ?f e) = ?f ` free_vars e

goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
fix x A
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
assume "Suc x \<in> A"
[PROOF STATE]
proof (state)
this:
Suc x \<in> A

goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
hence "Suc (f x) \<in> case_nat 0 (\<lambda>x. Suc (f x)) ` A"
[PROOF STATE]
proof (prove)
using this:
Suc x \<in> A

goal (1 subgoal):
 1. Suc (f x) \<in> case_nat 0 (\<lambda>x. Suc (f x)) ` A
[PROOF STEP]
by (subst image_iff, intro bexI[of _ "Suc x"]) (simp split: nat.split)
[PROOF STATE]
proof (state)
this:
Suc (f x) \<in> case_nat 0 (\<lambda>x. Suc (f x)) ` A

goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Suc ?x2 \<in> ?A2 \<Longrightarrow> Suc (f ?x2) \<in> case_nat 0 (\<lambda>x. Suc (f x)) ` ?A2

goal (6 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
 6. \<And>e x2a f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (\<integral>\<^sub>c e \<partial>x2a)) = f ` free_vars (\<integral>\<^sub>c e \<partial>x2a)
[PROOF STEP]
with CIntegral
[PROOF STATE]
proof (chain)
picking this:
free_vars (map_vars ?f e) = ?f ` free_vars e
Suc ?x2 \<in> ?A2 \<Longrightarrow> Suc (f ?x2) \<in> case_nat 0 (\<lambda>x. Suc (f x)) ` ?A2
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
free_vars (map_vars ?f e) = ?f ` free_vars e
Suc ?x2 \<in> ?A2 \<Longrightarrow> Suc (f ?x2) \<in> case_nat 0 (\<lambda>x. Suc (f x)) ` ?A2

goal (1 subgoal):
 1. free_vars (map_vars f (\<integral>\<^sub>c e \<partial>t)) = f ` free_vars (\<integral>\<^sub>c e \<partial>t)
[PROOF STEP]
by (auto split: nat.split_asm)
[PROOF STATE]
proof (state)
this:
free_vars (map_vars f (\<integral>\<^sub>c e \<partial>t)) = f ` free_vars (\<integral>\<^sub>c e \<partial>t)

goal (5 subgoals):
 1. \<And>x f. free_vars (map_vars f (CVar x)) = f ` free_vars (CVar x)
 2. \<And>x f. free_vars (map_vars f (CVal x)) = f ` free_vars (CVal x)
 3. \<And>e1 e2 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2\<rbrakk> \<Longrightarrow> free_vars (map_vars f <e1, e2>\<^sub>c) = f ` free_vars <e1, e2>\<^sub>c
 4. \<And>x1a e f. (\<And>f. free_vars (map_vars f e) = f ` free_vars e) \<Longrightarrow> free_vars (map_vars f (x1a $$\<^sub>c e)) = f ` free_vars (x1a $$\<^sub>c e)
 5. \<And>e1 e2 e3 f. \<lbrakk>\<And>f. free_vars (map_vars f e1) = f ` free_vars e1; \<And>f. free_vars (map_vars f e2) = f ` free_vars e2; \<And>f. free_vars (map_vars f e3) = f ` free_vars e3\<rbrakk> \<Longrightarrow> free_vars (map_vars f (IF\<^sub>c e1 THEN e2 ELSE e3)) = f ` free_vars (IF\<^sub>c e1 THEN e2 ELSE e3)
[PROOF STEP]
qed auto


[STATEMENT]
lemma lex_trans:
  fixes ps1 ps2 ps3 :: "nat list"
  assumes "ps1 \<sqsubset>lex ps2" "ps2 \<sqsubset>lex ps3"
  shows "ps1 \<sqsubset>lex ps3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ps1 \<sqsubset>lex ps3
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
ps1 \<sqsubset>lex ps2
ps2 \<sqsubset>lex ps3

goal (1 subgoal):
 1. ps1 \<sqsubset>lex ps3
[PROOF STEP]
by (induct arbitrary: ps3 rule: lex_list.induct)
   (auto elim: lex_list.cases)


[STATEMENT]
lemma LIMSEQ_subseq_LIMSEQ: "X \<longlonglongrightarrow> L \<Longrightarrow> strict_mono f \<Longrightarrow> (X \<circ> f) \<longlonglongrightarrow> L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<longlonglongrightarrow> L; strict_mono f\<rbrakk> \<Longrightarrow> (X \<circ> f) \<longlonglongrightarrow> L
[PROOF STEP]
unfolding comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<longlonglongrightarrow> L; strict_mono f\<rbrakk> \<Longrightarrow> (\<lambda>x. X (f x)) \<longlonglongrightarrow> L
[PROOF STEP]
by (rule filterlim_compose [of X, OF _ filterlim_subseq])


[STATEMENT]
lemma (in finite_field) order_pow_eq_self':
  assumes "x \<in> carrier R"
  shows "x [^] (order R ^ d) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^] order R ^ d = x
[PROOF STEP]
proof (induction d)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x [^] order R ^ 0 = x
 2. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. x [^] order R ^ 0 = x
 2. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^] order R ^ 0 = x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier R

goal (1 subgoal):
 1. x [^] order R ^ 0 = x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x [^] order R ^ 0 = x

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
case (Suc d)
[PROOF STATE]
proof (state)
this:
x [^] order R ^ d = x

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
have "x [^] order R ^ (Suc d) = x [^] (order R ^ d * order R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^] order R ^ Suc d = x [^] (order R ^ d * order R)
[PROOF STEP]
by (simp add:mult.commute)
[PROOF STATE]
proof (state)
this:
x [^] order R ^ Suc d = x [^] (order R ^ d * order R)

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x [^] order R ^ Suc d = x [^] (order R ^ d * order R)

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
have "... = (x [^] (order R ^ d)) [^] order R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^] (order R ^ d * order R) = (x [^] order R ^ d) [^] order R
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier R

goal (1 subgoal):
 1. x [^] (order R ^ d * order R) = (x [^] order R ^ d) [^] order R
[PROOF STEP]
by (simp add: nat_pow_pow)
[PROOF STATE]
proof (state)
this:
x [^] (order R ^ d * order R) = (x [^] order R ^ d) [^] order R

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x [^] (order R ^ d * order R) = (x [^] order R ^ d) [^] order R

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
have "... = (x [^] (order R ^ d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x [^] order R ^ d) [^] order R = x [^] order R ^ d
[PROOF STEP]
using order_pow_eq_self assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> carrier R \<Longrightarrow> ?x [^] order R = ?x
x \<in> carrier R

goal (1 subgoal):
 1. (x [^] order R ^ d) [^] order R = x [^] order R ^ d
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(x [^] order R ^ d) [^] order R = x [^] order R ^ d

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x [^] order R ^ d) [^] order R = x [^] order R ^ d

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
have "... = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^] order R ^ d = x
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
x [^] order R ^ d = x

goal (1 subgoal):
 1. x [^] order R ^ d = x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x [^] order R ^ d = x

goal (1 subgoal):
 1. \<And>d. x [^] order R ^ d = x \<Longrightarrow> x [^] order R ^ Suc d = x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x [^] order R ^ Suc d = x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
x [^] order R ^ Suc d = x

goal (1 subgoal):
 1. x [^] order R ^ Suc d = x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x [^] order R ^ Suc d = x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma int_add_floor: "z + \<lfloor>x\<rfloor> = \<lfloor>of_int z + x\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z + \<lfloor>x\<rfloor> = \<lfloor>of_int z + x\<rfloor>
[PROOF STEP]
using floor_correct [of x]
[PROOF STATE]
proof (prove)
using this:
of_int \<lfloor>x\<rfloor> \<le> x \<and> x < of_int (\<lfloor>x\<rfloor> + 1)

goal (1 subgoal):
 1. z + \<lfloor>x\<rfloor> = \<lfloor>of_int z + x\<rfloor>
[PROOF STEP]
by (simp add: floor_unique[symmetric])


[STATEMENT]
lemma separated_by_not_empty: "separated_by w x y \<Longrightarrow> w\<noteq>{}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. separated_by w x y \<Longrightarrow> w \<noteq> {}
[PROOF STEP]
unfolding separated_by_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>A B. w = {A, B} \<and> x \<in> A \<and> y \<in> B \<Longrightarrow> w \<noteq> {}
[PROOF STEP]
by fast


[STATEMENT]
lemma Proj_orthog_ccspan_union:
  assumes "\<And>x y. x \<in> X \<Longrightarrow> y \<in> Y \<Longrightarrow> is_orthogonal x y"
  shows \<open>Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)
[PROOF STEP]
have \<open>x \<in> cspan X \<Longrightarrow> y \<in> cspan Y \<Longrightarrow> is_orthogonal x y\<close> for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> cspan X; y \<in> cspan Y\<rbrakk> \<Longrightarrow> is_orthogonal x y
[PROOF STEP]
apply (rule is_orthogonal_closure_cspan[where X=X and Y=Y])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa ya. \<lbrakk>x \<in> cspan X; y \<in> cspan Y; xa \<in> X; ya \<in> Y\<rbrakk> \<Longrightarrow> is_orthogonal xa ya
 2. \<lbrakk>x \<in> cspan X; y \<in> cspan Y\<rbrakk> \<Longrightarrow> x \<in> closure (cspan X)
 3. \<lbrakk>x \<in> cspan X; y \<in> cspan Y\<rbrakk> \<Longrightarrow> y \<in> closure (cspan Y)
[PROOF STEP]
using closure_subset assms
[PROOF STATE]
proof (prove)
using this:
?S \<subseteq> closure ?S
\<lbrakk>?x \<in> X; ?y \<in> Y\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y

goal (3 subgoals):
 1. \<And>xa ya. \<lbrakk>x \<in> cspan X; y \<in> cspan Y; xa \<in> X; ya \<in> Y\<rbrakk> \<Longrightarrow> is_orthogonal xa ya
 2. \<lbrakk>x \<in> cspan X; y \<in> cspan Y\<rbrakk> \<Longrightarrow> x \<in> closure (cspan X)
 3. \<lbrakk>x \<in> cspan X; y \<in> cspan Y\<rbrakk> \<Longrightarrow> y \<in> closure (cspan Y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> cspan X; ?y \<in> cspan Y\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y

goal (1 subgoal):
 1. Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?x \<in> cspan X; ?y \<in> cspan Y\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y
[PROOF STEP]
have \<open>x \<in> closure (cspan X) \<Longrightarrow> y \<in> closure (cspan Y) \<Longrightarrow> is_orthogonal x y\<close> for x y
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> cspan X; ?y \<in> cspan Y\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y

goal (1 subgoal):
 1. \<lbrakk>x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y
[PROOF STEP]
by (metis orthogonal_complementI orthogonal_complement_of_closure orthogonal_complement_orthoI')
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> closure (cspan X); ?y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y

goal (1 subgoal):
 1. Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?x \<in> closure (cspan X); ?y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> closure (cspan X); ?y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y

goal (1 subgoal):
 1. Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)
[PROOF STEP]
apply (transfer fixing: X Y)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y) \<Longrightarrow> projection (closure (cspan (X \<union> Y))) = (\<lambda>x. projection (closure (cspan X)) x + projection (closure (cspan Y)) x)
[PROOF STEP]
apply (subst projection_plus[symmetric])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y. \<lbrakk>\<And>x y. \<lbrakk>x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y; x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y
 2. (\<And>x y. \<lbrakk>x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y) \<Longrightarrow> closed_csubspace (closure (cspan X))
 3. (\<And>x y. \<lbrakk>x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y) \<Longrightarrow> closed_csubspace (closure (cspan Y))
 4. (\<And>x y. \<lbrakk>x \<in> closure (cspan X); y \<in> closure (cspan Y)\<rbrakk> \<Longrightarrow> is_orthogonal x y) \<Longrightarrow> projection (closure (cspan (X \<union> Y))) = projection (closure (cspan X) +\<^sub>M closure (cspan Y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Proj (ccspan (X \<union> Y)) = Proj (ccspan X) + Proj (ccspan Y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bdd_below_mono:
  assumes "bdd_below B" and "A \<subseteq> B"
  shows "bdd_below A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.bdd_below A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
local.bdd_below B
A \<subseteq> B

goal (1 subgoal):
 1. local.bdd_below A
[PROOF STEP]
unfolding bdd_def
[PROOF STATE]
proof (prove)
using this:
\<exists>M\<in>UNIV. \<forall>x\<in>B. M \<le>\<^sub>a x
A \<subseteq> B

goal (1 subgoal):
 1. \<exists>M\<in>UNIV. \<forall>x\<in>A. M \<le>\<^sub>a x
[PROOF STEP]
by auto


[STATEMENT]
lemma refl_mult2_ns:
  assumes "refl ns" shows "refl (mult2_ns ns s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. refl (mult2_ns ns s)
[PROOF STEP]
using refl_multpw[OF assms]
[PROOF STATE]
proof (prove)
using this:
refl (multpw ns)

goal (1 subgoal):
 1. refl (mult2_ns ns s)
[PROOF STEP]
unfolding mult2_ns_def refl_on_def
[PROOF STATE]
proof (prove)
using this:
multpw ns \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> multpw ns)

goal (1 subgoal):
 1. multpw ns O (mult s)\<^sup>= \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> multpw ns O (mult s)\<^sup>=)
[PROOF STEP]
by fast


[STATEMENT]
lemma tabulate2_nth:
  assumes i: "i<nr" and j: "j<nc"
  shows "(tabulate2 nr nc f) !! i !! j = f i j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tabulate2 nr nc f !! i !! j = f i j
[PROOF STEP]
unfolding tabulate2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.of_fun (\<lambda>i. IArray.of_fun (f i) nc) nr !! i !! j = f i j
[PROOF STEP]
using i j nth_map
[PROOF STATE]
proof (prove)
using this:
i < nr
j < nc
?n < length ?xs \<Longrightarrow> map ?f ?xs ! ?n = ?f (?xs ! ?n)

goal (1 subgoal):
 1. IArray.of_fun (\<lambda>i. IArray.of_fun (f i) nc) nr !! i !! j = f i j
[PROOF STEP]
by auto


[STATEMENT]
lemma (in Corps) etm_mem:"\<lbrakk>valuation K v; t \<in> carrier K; v t = 1;
     x \<in> carrier K; x \<noteq> \<zero>\<rbrakk> \<Longrightarrow> etm\<^bsub>K v t x\<^esub> n \<in> carrier K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; t \<in> carrier K; v t = 1; x \<in> carrier K; x \<noteq> \<zero>\<rbrakk> \<Longrightarrow> etm\<^bsub> K v t x\<^esub> n \<in> carrier K
[PROOF STEP]
apply (frule val1_neq_0[of v t], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; t \<in> carrier K; v t = 1; x \<in> carrier K; x \<noteq> \<zero>; t \<noteq> \<zero>\<rbrakk> \<Longrightarrow> etm\<^bsub> K v t x\<^esub> n \<in> carrier K
[PROOF STEP]
apply (simp add:expand_term_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; t \<in> carrier K; v t = 1; x \<in> carrier K; x \<noteq> \<zero>; t \<noteq> \<zero>\<rbrakk> \<Longrightarrow> ecf\<^bsub>K v t x\<^esub> n \<cdot>\<^sub>r t\<^bsub>K\<^esub>\<^bsup>(tna (v x) + int n)\<^esup> \<in> carrier K
[PROOF STEP]
apply (cut_tac field_is_ring,
       rule Ring.ring_tOp_closed[of "K"], assumption)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; t \<in> carrier K; v t = 1; x \<in> carrier K; x \<noteq> \<zero>; t \<noteq> \<zero>; Ring K\<rbrakk> \<Longrightarrow> ecf\<^bsub>K v t x\<^esub> n \<in> carrier K
 2. \<lbrakk>valuation K v; t \<in> carrier K; v t = 1; x \<in> carrier K; x \<noteq> \<zero>; t \<noteq> \<zero>; Ring K\<rbrakk> \<Longrightarrow> t\<^bsub>K\<^esub>\<^bsup>(tna (v x) + int n)\<^esup> \<in> carrier K
[PROOF STEP]
apply (simp add:ecf_mem)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; t \<in> carrier K; v t = 1; x \<in> carrier K; x \<noteq> \<zero>; t \<noteq> \<zero>; Ring K\<rbrakk> \<Longrightarrow> t\<^bsub>K\<^esub>\<^bsup>(tna (v x) + int n)\<^esup> \<in> carrier K
[PROOF STEP]
apply (simp add:npowf_mem)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Gcd_group_closure_eq_Gcd:
  "Gcd (group_closure S) = Gcd S" for S :: "int set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gcd (group_closure S) = Gcd S
[PROOF STEP]
proof (rule associated_eqI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. Gcd (group_closure S) dvd Gcd S
 2. Gcd S dvd Gcd (group_closure S)
 3. normalize (Gcd (group_closure S)) = Gcd (group_closure S)
 4. normalize (Gcd S) = Gcd S
[PROOF STEP]
have "Gcd S dvd s" if "s \<in> group_closure S" for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gcd S dvd s
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
s \<in> group_closure S

goal (1 subgoal):
 1. Gcd S dvd s
[PROOF STEP]
by induction auto
[PROOF STATE]
proof (state)
this:
?s \<in> group_closure S \<Longrightarrow> Gcd S dvd ?s

goal (4 subgoals):
 1. Gcd (group_closure S) dvd Gcd S
 2. Gcd S dvd Gcd (group_closure S)
 3. normalize (Gcd (group_closure S)) = Gcd (group_closure S)
 4. normalize (Gcd S) = Gcd S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?s \<in> group_closure S \<Longrightarrow> Gcd S dvd ?s
[PROOF STEP]
show "Gcd S dvd Gcd (group_closure S)"
[PROOF STATE]
proof (prove)
using this:
?s \<in> group_closure S \<Longrightarrow> Gcd S dvd ?s

goal (1 subgoal):
 1. Gcd S dvd Gcd (group_closure S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gcd S dvd Gcd (group_closure S)

goal (3 subgoals):
 1. Gcd (group_closure S) dvd Gcd S
 2. normalize (Gcd (group_closure S)) = Gcd (group_closure S)
 3. normalize (Gcd S) = Gcd S
[PROOF STEP]
have "Gcd (group_closure S) dvd s" if "s \<in> S" for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gcd (group_closure S) dvd s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Gcd (group_closure S) dvd s
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
s \<in> S
[PROOF STEP]
have "s \<in> group_closure S"
[PROOF STATE]
proof (prove)
using this:
s \<in> S

goal (1 subgoal):
 1. s \<in> group_closure S
[PROOF STEP]
by (simp add: group_closure.base)
[PROOF STATE]
proof (state)
this:
s \<in> group_closure S

goal (1 subgoal):
 1. Gcd (group_closure S) dvd s
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
s \<in> group_closure S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
s \<in> group_closure S

goal (1 subgoal):
 1. Gcd (group_closure S) dvd s
[PROOF STEP]
by (rule Gcd_dvd)
[PROOF STATE]
proof (state)
this:
Gcd (group_closure S) dvd s

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?s \<in> S \<Longrightarrow> Gcd (group_closure S) dvd ?s

goal (3 subgoals):
 1. Gcd (group_closure S) dvd Gcd S
 2. normalize (Gcd (group_closure S)) = Gcd (group_closure S)
 3. normalize (Gcd S) = Gcd S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?s \<in> S \<Longrightarrow> Gcd (group_closure S) dvd ?s
[PROOF STEP]
show "Gcd (group_closure S) dvd Gcd S"
[PROOF STATE]
proof (prove)
using this:
?s \<in> S \<Longrightarrow> Gcd (group_closure S) dvd ?s

goal (1 subgoal):
 1. Gcd (group_closure S) dvd Gcd S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gcd (group_closure S) dvd Gcd S

goal (2 subgoals):
 1. normalize (Gcd (group_closure S)) = Gcd (group_closure S)
 2. normalize (Gcd S) = Gcd S
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma bij_funToCone:
    shows "bij_betw funToCone (S.PiE' I (S.set o D)) (cones S.unity)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw funToCone (Pi I (S.set \<circ> D) \<inter> S.extensional' I) (cones S.unity)
[PROOF STEP]
using coneToFun_mapsto funToCone_mapsto funToCone_coneToFun coneToFun_funToCone
            bij_betwI
[PROOF STATE]
proof (prove)
using this:
coneToFun \<in> cones S.unity \<rightarrow> Pi I (S.set \<circ> D) \<inter> S.extensional' I
funToCone \<in> Pi I (S.set \<circ> D) \<inter> S.extensional' I \<rightarrow> cones S.unity
?\<chi> \<in> cones S.unity \<Longrightarrow> funToCone (coneToFun ?\<chi>) = ?\<chi>
?F \<in> Pi I (S.set \<circ> D) \<inter> S.extensional' I \<Longrightarrow> coneToFun (funToCone ?F) = ?F
\<lbrakk>?f \<in> ?A \<rightarrow> ?B; ?g \<in> ?B \<rightarrow> ?A; \<And>x. x \<in> ?A \<Longrightarrow> ?g (?f x) = x; \<And>y. y \<in> ?B \<Longrightarrow> ?f (?g y) = y\<rbrakk> \<Longrightarrow> bij_betw ?f ?A ?B

goal (1 subgoal):
 1. bij_betw funToCone (Pi I (S.set \<circ> D) \<inter> S.extensional' I) (cones S.unity)
[PROOF STEP]
by blast


[STATEMENT]
lemma r_distinguishable_k_intersection_path :
  assumes "\<not> r_distinguishable_k M q1 q2 k"
  and "length xs \<le> Suc k"
  and "set xs \<subseteq> (inputs M)"
  and "q1 \<in> states M"
  and "q2 \<in> states M"
shows "\<exists> p . path (product (from_FSM M q1) (from_FSM M q2)) (q1,q2) p \<and> map fst (p_io p) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<not> r_distinguishable_k M q1 q2 k
length xs \<le> Suc k
set xs \<subseteq> FSM.inputs M
q1 \<in> FSM.states M
q2 \<in> FSM.states M

goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
proof (induction k arbitrary: q1 q2 xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 0; length xs \<le> Suc 0; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
\<not> r_distinguishable_k M q1 q2 0
length xs \<le> Suc 0
set xs \<subseteq> FSM.inputs M
q1 \<in> FSM.states M
q2 \<in> FSM.states M

goal (2 subgoals):
 1. \<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 0; length xs \<le> Suc 0; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
let ?P = "(product (from_FSM M q1) (from_FSM M q2))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 0; length xs \<le> Suc 0; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
proof (cases "length xs < Suc 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
length xs < Suc 0

goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length xs < Suc 0
[PROOF STEP]
have "xs = []"
[PROOF STATE]
proof (prove)
using this:
length xs < Suc 0

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

goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
xs = []

goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "path (product (from_FSM M q1) (from_FSM M q2)) (q1,q2) []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) []
[PROOF STEP]
by (simp add: "0.prems"(4) "0.prems"(5) nil)
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) []

goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) []

goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "map fst (p_io []) = []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst (p_io []) = []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
map fst (p_io []) = []

goal (2 subgoals):
 1. length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
xs = []
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) []
map fst (p_io []) = []
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = []
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) []
map fst (p_io []) = []

goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> length xs < Suc 0

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "completely_specified_state ?P (q1,q2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> completely_specified_state ?P (q1,q2)"
[PROOF STATE]
proof (state)
this:
\<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)

goal (1 subgoal):
 1. \<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)
[PROOF STEP]
have "r_distinguishable_k M q1 q2 0"
[PROOF STATE]
proof (prove)
using this:
\<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)

goal (1 subgoal):
 1. r_distinguishable_k M q1 q2 0
[PROOF STEP]
using r_0_distinguishable_from_not_completely_specified_initial
[PROOF STATE]
proof (prove)
using this:
\<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)
\<lbrakk>\<not> completely_specified_state (Product_FSM.product (from_FSM ?M ?q1.0) (from_FSM ?M ?q2.0)) (?q1.0, ?q2.0); ?q1.0 \<in> FSM.states ?M; ?q2.0 \<in> FSM.states ?M\<rbrakk> \<Longrightarrow> r_distinguishable_k ?M ?q1.0 ?q2.0 0

goal (1 subgoal):
 1. r_distinguishable_k M q1 q2 0
[PROOF STEP]
by (metis "0.prems"(4) "0.prems"(5))
[PROOF STATE]
proof (state)
this:
r_distinguishable_k M q1 q2 0

goal (1 subgoal):
 1. \<not> completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r_distinguishable_k M q1 q2 0
[PROOF STEP]
show "False"
[PROOF STATE]
proof (prove)
using this:
r_distinguishable_k M q1 q2 0

goal (1 subgoal):
 1. False
[PROOF STEP]
using "0.prems"
[PROOF STATE]
proof (prove)
using this:
r_distinguishable_k M q1 q2 0
\<not> r_distinguishable_k M q1 q2 0
length xs \<le> Suc 0
set xs \<subseteq> FSM.inputs M
q1 \<in> FSM.states M
q2 \<in> FSM.states M

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)
[PROOF STEP]
have *: "\<forall> x \<in> (inputs ?P) . \<exists> t . t \<in> transitions ?P \<and> t_source t = (q1,q2) \<and> t_input t = x"
[PROOF STATE]
proof (prove)
using this:
completely_specified_state (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2)

goal (1 subgoal):
 1. \<forall>x\<in>FSM.inputs (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). \<exists>t. t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) \<and> t_source t = (q1, q2) \<and> t_input t = x
[PROOF STEP]
unfolding completely_specified_state.simps
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>FSM.inputs (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x

goal (1 subgoal):
 1. \<forall>x\<in>FSM.inputs (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). \<exists>t. t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) \<and> t_source t = (q1, q2) \<and> t_input t = x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>FSM.inputs (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). \<exists>t. t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) \<and> t_source t = (q1, q2) \<and> t_input t = x

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
let ?x = "hd xs"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "xs = [?x]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs = [hd xs]
[PROOF STEP]
using "0.prems"(2) False
[PROOF STATE]
proof (prove)
using this:
length xs \<le> Suc 0
\<not> length xs < Suc 0

goal (1 subgoal):
 1. xs = [hd xs]
[PROOF STEP]
by (metis Suc_length_conv le_neq_implies_less length_0_conv list.sel(1))
[PROOF STATE]
proof (state)
this:
xs = [hd xs]

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "?x \<in> (inputs M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hd xs \<in> FSM.inputs M
[PROOF STEP]
using "0.prems"(3) False
[PROOF STATE]
proof (prove)
using this:
set xs \<subseteq> FSM.inputs M
\<not> length xs < Suc 0

goal (1 subgoal):
 1. hd xs \<in> FSM.inputs M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hd xs \<in> FSM.inputs M

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hd xs \<in> FSM.inputs M
[PROOF STEP]
obtain t where "t \<in> transitions ?P" and "t_source t = (q1,q2)" and "t_input t = ?x"
[PROOF STATE]
proof (prove)
using this:
hd xs \<in> FSM.inputs M

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)); t_source t = (q1, q2); t_input t = hd xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using "*" "0.prems"(4) "0.prems"(5)
[PROOF STATE]
proof (prove)
using this:
hd xs \<in> FSM.inputs M
\<forall>x\<in>FSM.inputs (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). \<exists>t. t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) \<and> t_source t = (q1, q2) \<and> t_input t = x
q1 \<in> FSM.states M
q2 \<in> FSM.states M

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)); t_source t = (q1, q2); t_input t = hd xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
t_source t = (q1, q2)
t_input t = hd xs

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
t_source t = (q1, q2)
t_input t = hd xs
[PROOF STEP]
have "path ?P (q1,q2) [t]"
[PROOF STATE]
proof (prove)
using this:
t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
t_source t = (q1, q2)
t_input t = hd xs

goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) [t]
[PROOF STEP]
using single_transition_path
[PROOF STATE]
proof (prove)
using this:
t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
t_source t = (q1, q2)
t_input t = hd xs
?t \<in> FSM.transitions ?M \<Longrightarrow> path ?M (t_source ?t) [?t]

goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) [t]
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) [t]

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) [t]

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "map fst (p_io [t]) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst (p_io [t]) = xs
[PROOF STEP]
using \<open>t_input t = ?x\<close> \<open>xs = [hd xs]\<close>
[PROOF STATE]
proof (prove)
using this:
t_input t = hd xs
xs = [hd xs]

goal (1 subgoal):
 1. map fst (p_io [t]) = xs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
map fst (p_io [t]) = xs

goal (1 subgoal):
 1. \<not> length xs < Suc 0 \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) [t]
map fst (p_io [t]) = xs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) [t]
map fst (p_io [t]) = xs

goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
by (metis (no_types, lifting))
[PROOF STATE]
proof (state)
this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal (1 subgoal):
 1. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<not> r_distinguishable_k M ?q1.0 ?q2.0 k; length ?xs \<le> Suc k; set ?xs \<subseteq> FSM.inputs M; ?q1.0 \<in> FSM.states M; ?q2.0 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M ?q1.0) (from_FSM M ?q2.0)) (?q1.0, ?q2.0) p \<and> map fst (p_io p) = ?xs
\<not> r_distinguishable_k M q1 q2 (Suc k)
length xs \<le> Suc (Suc k)
set xs \<subseteq> FSM.inputs M
q1 \<in> FSM.states M
q2 \<in> FSM.states M

goal (1 subgoal):
 1. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
let ?P = "(product (from_FSM M q1) (from_FSM M q2))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k q1 q2 xs. \<lbrakk>\<And>q1 q2 xs. \<lbrakk>\<not> r_distinguishable_k M q1 q2 k; length xs \<le> Suc k; set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs; \<not> r_distinguishable_k M q1 q2 (Suc k); length xs \<le> Suc (Suc k); set xs \<subseteq> FSM.inputs M; q1 \<in> FSM.states M; q2 \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
proof (cases "length xs \<le> Suc k")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
length xs \<le> Suc k

goal (2 subgoals):
 1. length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "\<not> r_distinguishable_k M q1 q2 k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> r_distinguishable_k M q1 q2 k
[PROOF STEP]
using Suc.prems(1)
[PROOF STATE]
proof (prove)
using this:
\<not> r_distinguishable_k M q1 q2 (Suc k)

goal (1 subgoal):
 1. \<not> r_distinguishable_k M q1 q2 k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> r_distinguishable_k M q1 q2 k

goal (2 subgoals):
 1. length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
 2. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
using Suc.IH[OF \<open>\<not> r_distinguishable_k M q1 q2 k\<close> True Suc.prems(3,4,5)]
[PROOF STATE]
proof (prove)
using this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
by assumption
[PROOF STATE]
proof (state)
this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> length xs \<le> Suc k

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> length xs \<le> Suc k
[PROOF STEP]
have "length xs = Suc (Suc k)"
[PROOF STATE]
proof (prove)
using this:
\<not> length xs \<le> Suc k

goal (1 subgoal):
 1. length xs = Suc (Suc k)
[PROOF STEP]
using Suc.prems(2)
[PROOF STATE]
proof (prove)
using this:
\<not> length xs \<le> Suc k
length xs \<le> Suc (Suc k)

goal (1 subgoal):
 1. length xs = Suc (Suc k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length xs = Suc (Suc k)

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length xs = Suc (Suc k)
[PROOF STEP]
have "hd xs \<in> (inputs M)"
[PROOF STATE]
proof (prove)
using this:
length xs = Suc (Suc k)

goal (1 subgoal):
 1. hd xs \<in> FSM.inputs M
[PROOF STEP]
by (metis Suc.prems(3) contra_subsetD hd_in_set length_greater_0_conv zero_less_Suc)
[PROOF STATE]
proof (state)
this:
hd xs \<in> FSM.inputs M

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "set (tl xs) \<subseteq> (inputs M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (tl xs) \<subseteq> FSM.inputs M
[PROOF STEP]
by (metis \<open>length xs = Suc (Suc k)\<close> Suc.prems(3) dual_order.trans hd_Cons_tl length_0_conv nat.simps(3) set_subset_Cons)
[PROOF STATE]
proof (state)
this:
set (tl xs) \<subseteq> FSM.inputs M

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "length (tl xs) \<le> Suc k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (tl xs) \<le> Suc k
[PROOF STEP]
by (simp add: \<open>length xs = Suc (Suc k)\<close>)
[PROOF STATE]
proof (state)
this:
length (tl xs) \<le> Suc k

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
let ?x = "hd xs"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
let ?xs = "tl xs"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "\<forall> x \<in> (inputs M) . \<exists> t \<in> transitions ?P . t_source t = (q1,q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>FSM.inputs M. \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
assume "x \<in> (inputs M)"
[PROOF STATE]
proof (state)
this:
x \<in> FSM.inputs M

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
have "\<not>(\<exists> x \<in> (inputs M) . \<forall> t1 \<in> transitions M . \<forall> t2 \<in> transitions M . (t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2) \<longrightarrow> r_distinguishable_k M (t_target t1) (t_target t2) k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (\<exists>x\<in>FSM.inputs M. \<forall>t1\<in>FSM.transitions M. \<forall>t2\<in>FSM.transitions M. t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<longrightarrow> r_distinguishable_k M (t_target t1) (t_target t2) k)
[PROOF STEP]
using Suc.prems
[PROOF STATE]
proof (prove)
using this:
\<not> r_distinguishable_k M q1 q2 (Suc k)
length xs \<le> Suc (Suc k)
set xs \<subseteq> FSM.inputs M
q1 \<in> FSM.states M
q2 \<in> FSM.states M

goal (1 subgoal):
 1. \<not> (\<exists>x\<in>FSM.inputs M. \<forall>t1\<in>FSM.transitions M. \<forall>t2\<in>FSM.transitions M. t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<longrightarrow> r_distinguishable_k M (t_target t1) (t_target t2) k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>x\<in>FSM.inputs M. \<forall>t1\<in>FSM.transitions M. \<forall>t2\<in>FSM.transitions M. t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<longrightarrow> r_distinguishable_k M (t_target t1) (t_target t2) k)

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<exists>x\<in>FSM.inputs M. \<forall>t1\<in>FSM.transitions M. \<forall>t2\<in>FSM.transitions M. t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<longrightarrow> r_distinguishable_k M (t_target t1) (t_target t2) k)
[PROOF STEP]
have "\<forall> x \<in> (inputs M) . \<exists> t1 t2 . (t1 \<in> transitions M \<and> t2 \<in> transitions M \<and> t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<and> \<not> r_distinguishable_k M (t_target t1) (t_target t2) k)"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<exists>x\<in>FSM.inputs M. \<forall>t1\<in>FSM.transitions M. \<forall>t2\<in>FSM.transitions M. t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<longrightarrow> r_distinguishable_k M (t_target t1) (t_target t2) k)

goal (1 subgoal):
 1. \<forall>x\<in>FSM.inputs M. \<exists>t1 t2. t1 \<in> FSM.transitions M \<and> t2 \<in> FSM.transitions M \<and> t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<and> \<not> r_distinguishable_k M (t_target t1) (t_target t2) k
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>FSM.inputs M. \<exists>t1 t2. t1 \<in> FSM.transitions M \<and> t2 \<in> FSM.transitions M \<and> t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<and> \<not> r_distinguishable_k M (t_target t1) (t_target t2) k

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>FSM.inputs M. \<exists>t1 t2. t1 \<in> FSM.transitions M \<and> t2 \<in> FSM.transitions M \<and> t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<and> \<not> r_distinguishable_k M (t_target t1) (t_target t2) k
[PROOF STEP]
obtain t1 t2 where "t1 \<in> transitions M"
                          and "t2 \<in> transitions M"
                          and "t_source t1 = q1"
                          and "t_source t2 = q2"
                          and "t_input t1 = x"
                          and "t_input t2 = x"
                          and p4: "t_output t1 = t_output t2"
                          and **: "\<not> r_distinguishable_k M (t_target t1) (t_target t2) k"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>FSM.inputs M. \<exists>t1 t2. t1 \<in> FSM.transitions M \<and> t2 \<in> FSM.transitions M \<and> t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<and> \<not> r_distinguishable_k M (t_target t1) (t_target t2) k

goal (1 subgoal):
 1. (\<And>t1 t2. \<lbrakk>t1 \<in> FSM.transitions M; t2 \<in> FSM.transitions M; t_source t1 = q1; t_source t2 = q2; t_input t1 = x; t_input t2 = x; t_output t1 = t_output t2; \<not> r_distinguishable_k M (t_target t1) (t_target t2) k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>x \<in> (inputs M)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>FSM.inputs M. \<exists>t1 t2. t1 \<in> FSM.transitions M \<and> t2 \<in> FSM.transitions M \<and> t_source t1 = q1 \<and> t_source t2 = q2 \<and> t_input t1 = x \<and> t_input t2 = x \<and> t_output t1 = t_output t2 \<and> \<not> r_distinguishable_k M (t_target t1) (t_target t2) k
x \<in> FSM.inputs M

goal (1 subgoal):
 1. (\<And>t1 t2. \<lbrakk>t1 \<in> FSM.transitions M; t2 \<in> FSM.transitions M; t_source t1 = q1; t_source t2 = q2; t_input t1 = x; t_input t2 = x; t_output t1 = t_output t2; \<not> r_distinguishable_k M (t_target t1) (t_target t2) k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t1 \<in> FSM.transitions M
t2 \<in> FSM.transitions M
t_source t1 = q1
t_source t2 = q2
t_input t1 = x
t_input t2 = x
t_output t1 = t_output t2
\<not> r_distinguishable_k M (t_target t1) (t_target t2) k

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
have p1: "t1 \<in> transitions (from_FSM M q1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t1 \<in> FSM.transitions (from_FSM M q1)
[PROOF STEP]
by (simp add: Suc.prems(4) \<open>t1 \<in> FSM.transitions M\<close>)
[PROOF STATE]
proof (state)
this:
t1 \<in> FSM.transitions (from_FSM M q1)

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
have p2: "t2 \<in> transitions (from_FSM M q2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t2 \<in> FSM.transitions (from_FSM M q2)
[PROOF STEP]
by (simp add: Suc.prems(5) \<open>t2 \<in> FSM.transitions M\<close>)
[PROOF STATE]
proof (state)
this:
t2 \<in> FSM.transitions (from_FSM M q2)

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
have p3: "t_input t1 = t_input t2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_input t1 = t_input t2
[PROOF STEP]
using \<open>t_input t1 = x\<close> \<open>t_input t2 = x\<close>
[PROOF STATE]
proof (prove)
using this:
t_input t1 = x
t_input t2 = x

goal (1 subgoal):
 1. t_input t1 = t_input t2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t_input t1 = t_input t2

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
have ***: "((q1,q2), x, t_output t1, (t_target t1, t_target t2)) \<in> transitions ?P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((q1, q2), x, t_output t1, t_target t1, t_target t2) \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
[PROOF STEP]
using \<open>t_source t1 = q1\<close> \<open>t_source t2 = q2\<close> \<open>t_input t1 = x\<close> p1 p2 p3 p4
[PROOF STATE]
proof (prove)
using this:
t_source t1 = q1
t_source t2 = q2
t_input t1 = x
t1 \<in> FSM.transitions (from_FSM M q1)
t2 \<in> FSM.transitions (from_FSM M q2)
t_input t1 = t_input t2
t_output t1 = t_output t2

goal (1 subgoal):
 1. ((q1, q2), x, t_output t1, t_target t1, t_target t2) \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
[PROOF STEP]
unfolding product_transitions_alt_def
[PROOF STATE]
proof (prove)
using this:
t_source t1 = q1
t_source t2 = q2
t_input t1 = x
t1 \<in> FSM.transitions (from_FSM M q1)
t2 \<in> FSM.transitions (from_FSM M q2)
t_input t1 = t_input t2
t_output t1 = t_output t2

goal (1 subgoal):
 1. ((q1, q2), x, t_output t1, t_target t1, t_target t2) \<in> {((t_source tA, t_source tB), t_input tA, t_output tA, t_target tA, t_target tB) |tA tB. tA \<in> FSM.transitions (from_FSM M q1) \<and> tB \<in> FSM.transitions (from_FSM M q2) \<and> t_input tA = t_input tB \<and> t_output tA = t_output tB}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
((q1, q2), x, t_output t1, t_target t1, t_target t2) \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))

goal (1 subgoal):
 1. \<And>x. x \<in> FSM.inputs M \<Longrightarrow> \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
show "\<exists> t \<in> transitions ?P . t_source t = (q1,q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
by (metis "**" "***" fst_conv snd_conv)
[PROOF STATE]
proof (state)
this:
\<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>FSM.inputs M. \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>FSM.inputs M. \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
[PROOF STEP]
obtain t where "t \<in> transitions ?P" and "t_source t = (q1,q2)" and "t_input t = ?x"
                    and "\<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>FSM.inputs M. \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)); t_source t = (q1, q2); t_input t = hd xs; \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>?x \<in> (inputs M)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>FSM.inputs M. \<exists>t\<in>FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)). t_source t = (q1, q2) \<and> t_input t = x \<and> \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k
hd xs \<in> FSM.inputs M

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2)); t_source t = (q1, q2); t_input t = hd xs; \<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t \<in> FSM.transitions (Product_FSM.product (from_FSM M q1) (from_FSM M q2))
t_source t = (q1, q2)
t_input t = hd xs
\<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "fst (t_target t) \<in> FSM.states M" and "snd (t_target t) \<in> FSM.states M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (t_target t) \<in> FSM.states M &&& snd (t_target t) \<in> FSM.states M
[PROOF STEP]
using fsm_transition_target[OF \<open>t \<in> transitions ?P\<close>]
[PROOF STATE]
proof (prove)
using this:
t_target t \<in> FSM.states (Product_FSM.product (from_FSM M q1) (from_FSM M q2))

goal (1 subgoal):
 1. fst (t_target t) \<in> FSM.states M &&& snd (t_target t) \<in> FSM.states M
[PROOF STEP]
unfolding product_simps from_FSM_simps[OF \<open>q1 \<in> states M\<close>] from_FSM_simps[OF \<open>q2 \<in> states M\<close>]
[PROOF STATE]
proof (prove)
using this:
t_target t \<in> FSM.states M \<times> FSM.states M

goal (1 subgoal):
 1. fst (t_target t) \<in> FSM.states M &&& snd (t_target t) \<in> FSM.states M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fst (t_target t) \<in> FSM.states M
snd (t_target t) \<in> FSM.states M

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fst (t_target t) \<in> FSM.states M
snd (t_target t) \<in> FSM.states M
[PROOF STEP]
obtain p where p_def: "path (product (from_FSM M (fst (t_target t))) (from_FSM M (snd (t_target t)))) (t_target t) p"
               and "map fst (p_io p) = ?xs"
[PROOF STATE]
proof (prove)
using this:
fst (t_target t) \<in> FSM.states M
snd (t_target t) \<in> FSM.states M

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>path (Product_FSM.product (from_FSM M (fst (t_target t))) (from_FSM M (snd (t_target t)))) (t_target t) p; map fst (p_io p) = tl xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Suc.IH[OF \<open>\<not> r_distinguishable_k M (fst (t_target t)) (snd (t_target t)) k\<close> \<open>length (tl xs) \<le> Suc k\<close> \<open>set (tl xs) \<subseteq> (inputs M)\<close>]
[PROOF STATE]
proof (prove)
using this:
fst (t_target t) \<in> FSM.states M
snd (t_target t) \<in> FSM.states M
\<lbrakk>fst (t_target t) \<in> FSM.states M; snd (t_target t) \<in> FSM.states M\<rbrakk> \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M (fst (t_target t))) (from_FSM M (snd (t_target t)))) (fst (t_target t), snd (t_target t)) p \<and> map fst (p_io p) = tl xs

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>path (Product_FSM.product (from_FSM M (fst (t_target t))) (from_FSM M (snd (t_target t)))) (t_target t) p; map fst (p_io p) = tl xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M (fst (t_target t))) (from_FSM M (snd (t_target t)))) (t_target t) p
map fst (p_io p) = tl xs

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "path ?P (t_target t) p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (t_target t) p
[PROOF STEP]
using product_from_path_previous[OF p_def \<open>t \<in> transitions ?P\<close> Suc.prems(4,5)]
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (t_target t) p

goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (t_target t) p
[PROOF STEP]
by assumption
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (t_target t) p

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "path ?P (q1,q2) (t#p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) (t # p)
[PROOF STEP]
using path.cons[OF\<open>t \<in> transitions ?P\<close> \<open>path ?P (t_target t) p\<close>] \<open>t_source t = (q1,q2)\<close>
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (t_source t) (t # p)
t_source t = (q1, q2)

goal (1 subgoal):
 1. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) (t # p)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) (t # p)

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) (t # p)

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
have "map fst (p_io (t#p)) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst (p_io (t # p)) = xs
[PROOF STEP]
using \<open>t_input t = ?x\<close> \<open>map fst (p_io p) = ?xs\<close>
[PROOF STATE]
proof (prove)
using this:
t_input t = hd xs
map fst (p_io p) = tl xs

goal (1 subgoal):
 1. map fst (p_io (t # p)) = xs
[PROOF STEP]
by (metis (no_types, lifting) \<open>length xs = Suc (Suc k)\<close> \<open>t_input t = hd xs\<close> fst_conv hd_Cons_tl length_greater_0_conv list.simps(9) zero_less_Suc)
[PROOF STATE]
proof (state)
this:
map fst (p_io (t # p)) = xs

goal (1 subgoal):
 1. \<not> length xs \<le> Suc k \<Longrightarrow> \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) (t # p)
map fst (p_io (t # p)) = xs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) (t # p)
map fst (p_io (t # p)) = xs

goal (1 subgoal):
 1. \<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs
[PROOF STEP]
by (metis (no_types, lifting))
[PROOF STATE]
proof (state)
this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>p. path (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) (q1, q2) p \<and> map fst (p_io p) = xs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma content_image_stretch_interval:
  fixes m :: "'a::euclidean_space \<Rightarrow> real"
  defines "s f x \<equiv> (\<Sum>k::'a\<in>Basis. (f k * (x\<bullet>k)) *\<^sub>R k)"
  shows "content (s m ` cbox a b) = \<bar>\<Prod>k\<in>Basis. m k\<bar> * content (cbox a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
 2. \<not> ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
have s[measurable]: "s f \<in> borel \<rightarrow>\<^sub>M borel" for f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s f \<in> borel_measurable borel
[PROOF STEP]
by (auto simp: s_def[abs_def])
[PROOF STATE]
proof (state)
this:
s ?f \<in> borel_measurable borel

goal (2 subgoals):
 1. ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
 2. \<not> ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
assume m: "\<forall>k\<in>Basis. m k \<noteq> 0"
[PROOF STATE]
proof (state)
this:
\<forall>k\<in>Basis. m k \<noteq> 0

goal (2 subgoals):
 1. ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
 2. \<not> ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>k\<in>Basis. m k \<noteq> 0
[PROOF STEP]
have s_comp_s: "s (\<lambda>k. 1 / m k) \<circ> s m = id" "s m \<circ> s (\<lambda>k. 1 / m k) = id"
[PROOF STATE]
proof (prove)
using this:
\<forall>k\<in>Basis. m k \<noteq> 0

goal (1 subgoal):
 1. s (\<lambda>k. 1 / m k) \<circ> s m = id &&& s m \<circ> s (\<lambda>k. 1 / m k) = id
[PROOF STEP]
by (auto simp: s_def[abs_def] fun_eq_iff euclidean_representation)
[PROOF STATE]
proof (state)
this:
s (\<lambda>k. 1 / m k) \<circ> s m = id
s m \<circ> s (\<lambda>k. 1 / m k) = id

goal (2 subgoals):
 1. ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
 2. \<not> ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
s (\<lambda>k. 1 / m k) \<circ> s m = id
s m \<circ> s (\<lambda>k. 1 / m k) = id
[PROOF STEP]
have "inv (s (\<lambda>k. 1 / m k)) = s m" "bij (s (\<lambda>k. 1 / m k))"
[PROOF STATE]
proof (prove)
using this:
s (\<lambda>k. 1 / m k) \<circ> s m = id
s m \<circ> s (\<lambda>k. 1 / m k) = id

goal (1 subgoal):
 1. inv (s (\<lambda>k. 1 / m k)) = s m &&& bij (s (\<lambda>k. 1 / m k))
[PROOF STEP]
by (auto intro: inv_unique_comp o_bij)
[PROOF STATE]
proof (state)
this:
inv (s (\<lambda>k. 1 / m k)) = s m
bij (s (\<lambda>k. 1 / m k))

goal (2 subgoals):
 1. ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
 2. \<not> ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inv (s (\<lambda>k. 1 / m k)) = s m
bij (s (\<lambda>k. 1 / m k))
[PROOF STEP]
have eq: "s m ` cbox a b = s (\<lambda>k. 1 / m k) -` cbox a b"
[PROOF STATE]
proof (prove)
using this:
inv (s (\<lambda>k. 1 / m k)) = s m
bij (s (\<lambda>k. 1 / m k))

goal (1 subgoal):
 1. s m ` cbox a b = s (\<lambda>k. 1 / m k) -` cbox a b
[PROOF STEP]
using bij_vimage_eq_inv_image[OF \<open>bij (s (\<lambda>k. 1 / m k))\<close>, of "cbox a b"]
[PROOF STATE]
proof (prove)
using this:
inv (s (\<lambda>k. 1 / m k)) = s m
bij (s (\<lambda>k. 1 / m k))
s (\<lambda>k. 1 / m k) -` cbox a b = inv (s (\<lambda>k. 1 / m k)) ` cbox a b

goal (1 subgoal):
 1. s m ` cbox a b = s (\<lambda>k. 1 / m k) -` cbox a b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s m ` cbox a b = s (\<lambda>k. 1 / m k) -` cbox a b

goal (2 subgoals):
 1. ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
 2. \<not> ?P \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
using m
[PROOF STATE]
proof (prove)
using this:
\<forall>k\<in>Basis. m k \<noteq> 0

goal (1 subgoal):
 1. content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
unfolding eq measure_def
[PROOF STATE]
proof (prove)
using this:
\<forall>k\<in>Basis. m k \<noteq> 0

goal (1 subgoal):
 1. enn2real (emeasure lborel (s (\<lambda>k. 1 / m k) -` cbox a b)) = \<bar>prod m Basis\<bar> * enn2real (emeasure lborel (cbox a b))
[PROOF STEP]
by (subst lborel_affine_euclidean[where c=m and t=0])
       (simp_all add: emeasure_density measurable_sets_borel[OF s] abs_prod nn_integral_cmult
                      s_def[symmetric] emeasure_distr vimage_comp s_comp_s enn2real_mult prod_nonneg)
[PROOF STATE]
proof (state)
this:
content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)

goal (1 subgoal):
 1. \<not> (\<forall>k\<in>Basis. m k \<noteq> 0) \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>k\<in>Basis. m k \<noteq> 0) \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
assume "\<not> (\<forall>k\<in>Basis. m k \<noteq> 0)"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>k\<in>Basis. m k \<noteq> 0)

goal (1 subgoal):
 1. \<not> (\<forall>k\<in>Basis. m k \<noteq> 0) \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>k\<in>Basis. m k \<noteq> 0)
[PROOF STEP]
obtain k where k: "k \<in> Basis" "m k = 0"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>k\<in>Basis. m k \<noteq> 0)

goal (1 subgoal):
 1. (\<And>k. \<lbrakk>k \<in> Basis; m k = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k \<in> Basis
m k = 0

goal (1 subgoal):
 1. \<not> (\<forall>k\<in>Basis. m k \<noteq> 0) \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k \<in> Basis
m k = 0
[PROOF STEP]
have [simp]: "(\<Prod>k\<in>Basis. m k) = 0"
[PROOF STATE]
proof (prove)
using this:
k \<in> Basis
m k = 0

goal (1 subgoal):
 1. prod m Basis = 0
[PROOF STEP]
by (intro prod_zero) auto
[PROOF STATE]
proof (state)
this:
prod m Basis = 0

goal (1 subgoal):
 1. \<not> (\<forall>k\<in>Basis. m k \<noteq> 0) \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
have "emeasure lborel {x\<in>space lborel. x \<in> s m ` cbox a b} = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure lborel {x \<in> space lborel. x \<in> s m ` cbox a b} = 0
[PROOF STEP]
proof (rule emeasure_eq_0_AE)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. AE x in lborel. x \<notin> s m ` cbox a b
[PROOF STEP]
show "AE x in lborel. x \<notin> s m ` cbox a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in lborel. x \<notin> s m ` cbox a b
[PROOF STEP]
using AE_lborel_inner_neq[OF \<open>k\<in>Basis\<close>]
[PROOF STATE]
proof (prove)
using this:
AE x in lborel. x \<bullet> k \<noteq> ?c

goal (1 subgoal):
 1. AE x in lborel. x \<notin> s m ` cbox a b
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<bullet> k \<noteq> ?c1 \<Longrightarrow> x \<notin> s m ` cbox a b
[PROOF STEP]
show "x \<bullet> k \<noteq> 0 \<Longrightarrow> x \<notin> s m ` cbox a b " for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<bullet> k \<noteq> 0 \<Longrightarrow> x \<notin> s m ` cbox a b
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
k \<in> Basis
m k = 0

goal (1 subgoal):
 1. x \<bullet> k \<noteq> 0 \<Longrightarrow> x \<notin> s m ` cbox a b
[PROOF STEP]
by (auto simp: s_def[abs_def] cbox_def)
[PROOF STATE]
proof (state)
this:
?x \<bullet> k \<noteq> 0 \<Longrightarrow> ?x \<notin> s m ` cbox a b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
AE x in lborel. x \<notin> s m ` cbox a b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
emeasure lborel {x \<in> space lborel. x \<in> s m ` cbox a b} = 0

goal (1 subgoal):
 1. \<not> (\<forall>k\<in>Basis. m k \<noteq> 0) \<Longrightarrow> content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
emeasure lborel {x \<in> space lborel. x \<in> s m ` cbox a b} = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
emeasure lborel {x \<in> space lborel. x \<in> s m ` cbox a b} = 0

goal (1 subgoal):
 1. content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)
[PROOF STEP]
by (simp add: measure_def)
[PROOF STATE]
proof (state)
this:
content (s m ` cbox a b) = \<bar>prod m Basis\<bar> * content (cbox a b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cramer: "\<not>det3 s t q = 0 \<Longrightarrow>
  (det3 t p r) = ((det3 t q r) * (det3 s t p) + (det3 t p q) * (det3 s t r))/(det3 s t q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det3 s t q \<noteq> 0 \<Longrightarrow> det3 t p r = (det3 t q r * det3 s t p + det3 t p q * det3 s t r) / det3 s t q
[PROOF STEP]
by (auto simp: det3_def' field_simps)


[STATEMENT]
lemma Units_eq_nonzero:
 "Units Q\<^sub>p = nonzero Q\<^sub>p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Units Q\<^sub>p = nonzero Q\<^sub>p
[PROOF STEP]
using frac_nonzero_Units
[PROOF STATE]
proof (prove)
using this:
nonzero (Frac Z\<^sub>p) = Units (Frac Z\<^sub>p)

goal (1 subgoal):
 1. Units Q\<^sub>p = nonzero Q\<^sub>p
[PROOF STEP]
unfolding Q\<^sub>p_def Z\<^sub>p_def
[PROOF STATE]
proof (prove)
using this:
nonzero (Frac (padic_int p)) = Units (Frac (padic_int p))

goal (1 subgoal):
 1. Units (Frac (padic_int p)) = nonzero (Frac (padic_int p))
[PROOF STEP]
by blast


[STATEMENT]
lemma gr0_imp_self_le_mult2: "0 < (k::nat) \<Longrightarrow> m \<le> k * m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < k \<Longrightarrow> m \<le> k * m
[PROOF STEP]
by (subst mult.commute, rule gr0_imp_self_le_mult1)


[STATEMENT]
lemma convergent_prod_LIMSEQ:
  shows "convergent_prod f \<Longrightarrow> (\<lambda>n. \<Prod>i\<le>n. f i) \<longlonglongrightarrow> prodinf f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent_prod f \<Longrightarrow> (\<lambda>n. prod f {..n}) \<longlonglongrightarrow> prodinf f
[PROOF STEP]
by (metis convergent_LIMSEQ_iff convergent_prod_has_prod convergent_prod_imp_convergent
      convergent_prod_to_zero_iff raw_has_prod_eq_0 has_prod_def prodinf_eq_lim zero_le)


[STATEMENT]
lemma product_lists_set:
  "set (product_lists xss) = {xs. list_all2 (\<lambda>x ys. x \<in> set ys) xs xss}" (is "?L = Collect ?R")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (product_lists xss) = {xs. list_all2 (\<lambda>x ys. x \<in> set ys) xs xss}
[PROOF STEP]
proof (intro equalityI subsetI, unfold mem_Collect_eq)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> set (product_lists xss) \<Longrightarrow> list_all2 (\<lambda>x ys. x \<in> set ys) x xss
 2. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
fix xs
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> set (product_lists xss) \<Longrightarrow> list_all2 (\<lambda>x ys. x \<in> set ys) x xss
 2. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
assume "xs \<in> ?L"
[PROOF STATE]
proof (state)
this:
xs \<in> set (product_lists xss)

goal (2 subgoals):
 1. \<And>x. x \<in> set (product_lists xss) \<Longrightarrow> list_all2 (\<lambda>x ys. x \<in> set ys) x xss
 2. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs \<in> set (product_lists xss)
[PROOF STEP]
have "length xs = length xss"
[PROOF STATE]
proof (prove)
using this:
xs \<in> set (product_lists xss)

goal (1 subgoal):
 1. length xs = length xss
[PROOF STEP]
by (rule in_set_product_lists_length)
[PROOF STATE]
proof (state)
this:
length xs = length xss

goal (2 subgoals):
 1. \<And>x. x \<in> set (product_lists xss) \<Longrightarrow> list_all2 (\<lambda>x ys. x \<in> set ys) x xss
 2. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
from this \<open>xs \<in> ?L\<close>
[PROOF STATE]
proof (chain)
picking this:
length xs = length xss
xs \<in> set (product_lists xss)
[PROOF STEP]
show "?R xs"
[PROOF STATE]
proof (prove)
using this:
length xs = length xss
xs \<in> set (product_lists xss)

goal (1 subgoal):
 1. list_all2 (\<lambda>x ys. x \<in> set ys) xs xss
[PROOF STEP]
by (induct xs xss rule: list_induct2) auto
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) xs xss

goal (1 subgoal):
 1. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
fix xs
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
assume "?R xs"
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) xs xss

goal (1 subgoal):
 1. \<And>x. list_all2 (\<lambda>x ys. x \<in> set ys) x xss \<Longrightarrow> x \<in> set (product_lists xss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
list_all2 (\<lambda>x ys. x \<in> set ys) xs xss
[PROOF STEP]
show "xs \<in> ?L"
[PROOF STATE]
proof (prove)
using this:
list_all2 (\<lambda>x ys. x \<in> set ys) xs xss

goal (1 subgoal):
 1. xs \<in> set (product_lists xss)
[PROOF STEP]
by induct auto
[PROOF STATE]
proof (state)
this:
xs \<in> set (product_lists xss)

goal:
No subgoals!
[PROOF STEP]
qed