[STATEMENT]
lemma set_columns_Gram_Schmidt_matrix:
  fixes A::"real^'n::{mod_type}^'m::{mod_type}"
  shows "{column i (Gram_Schmidt_matrix A)|i. i < k} = {column i (Gram_Schmidt_upt_k A (to_nat k))|i. i < k}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {column i (Gram_Schmidt_matrix A) |i. i < k} = {column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) |i. i < k}
[PROOF STEP]
proof (auto)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_matrix A) = column ia (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) \<and> ia < k
 2. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_matrix A) = column ia (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) \<and> ia < k
 2. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k
[PROOF STEP]
assume i: "i<k"
[PROOF STATE]
proof (state)
this:
i < k

goal (2 subgoals):
 1. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_matrix A) = column ia (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) \<and> ia < k
 2. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k
[PROOF STEP]
show "\<exists>ia. column i (Gram_Schmidt_matrix A) = column ia (Gram_Schmidt_upt_k A (to_nat k)) \<and> ia < k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ia. column i (Gram_Schmidt_matrix A) = column ia (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) \<and> ia < k
[PROOF STEP]
proof (rule exI[of _ i], rule conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. column i (Gram_Schmidt_matrix A) = column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k))
 2. i < k
[PROOF STEP]
show "column i (Gram_Schmidt_matrix A) = column i (Gram_Schmidt_upt_k A (to_nat k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. column i (Gram_Schmidt_matrix A) = column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k))
[PROOF STEP]
unfolding Gram_Schmidt_matrix_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. column i (Gram_Schmidt_upt_k A (ncols A - 1)) = column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k))
[PROOF STEP]
proof (rule column_Gram_Schmidt_upt_k_preserves2[symmetric])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)
 2. mod_type_class.to_nat k \<le> ncols A - 1
 3. ncols A - 1 < ncols A
[PROOF STEP]
show "i \<le> from_nat (to_nat k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < k

goal (1 subgoal):
 1. i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)
[PROOF STEP]
unfolding from_nat_to_nat_id
[PROOF STATE]
proof (prove)
using this:
i < k

goal (1 subgoal):
 1. i \<le> k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)

goal (2 subgoals):
 1. mod_type_class.to_nat k \<le> ncols A - 1
 2. ncols A - 1 < ncols A
[PROOF STEP]
show "to_nat k \<le> ncols A - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.to_nat k \<le> ncols A - 1
[PROOF STEP]
unfolding ncols_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.to_nat k \<le> CARD('n) - 1
[PROOF STEP]
using to_nat_less_card[of k]
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat k < CARD('n)

goal (1 subgoal):
 1. mod_type_class.to_nat k \<le> CARD('n) - 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat k \<le> ncols A - 1

goal (1 subgoal):
 1. ncols A - 1 < ncols A
[PROOF STEP]
show "ncols A - 1 < ncols A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ncols A - 1 < ncols A
[PROOF STEP]
unfolding ncols_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CARD('n) - 1 < CARD('n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ncols A - 1 < ncols A

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
column i (Gram_Schmidt_matrix A) = column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k))

goal (1 subgoal):
 1. i < k
[PROOF STEP]
show "i < k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < k
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < k

goal (1 subgoal):
 1. i < k
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
i < k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>ia. column i (Gram_Schmidt_matrix A) = column ia (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) \<and> ia < k

goal (1 subgoal):
 1. \<And>i. i < k \<Longrightarrow> \<exists>ia. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k
[PROOF STEP]
show "\<exists>ia. column i (Gram_Schmidt_upt_k A (to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ia. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k
[PROOF STEP]
proof (rule exI[of _ i], rule conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column i (Gram_Schmidt_matrix A)
 2. i < k
[PROOF STEP]
show "column i (Gram_Schmidt_upt_k A (to_nat k)) = column i (Gram_Schmidt_matrix A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column i (Gram_Schmidt_matrix A)
[PROOF STEP]
unfolding Gram_Schmidt_matrix_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column i (Gram_Schmidt_upt_k A (ncols A - 1))
[PROOF STEP]
proof (rule column_Gram_Schmidt_upt_k_preserves2)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)
 2. mod_type_class.to_nat k \<le> ncols A - 1
 3. ncols A - 1 < ncols A
[PROOF STEP]
show "i \<le> from_nat (to_nat k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < k

goal (1 subgoal):
 1. i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)
[PROOF STEP]
unfolding from_nat_to_nat_id
[PROOF STATE]
proof (prove)
using this:
i < k

goal (1 subgoal):
 1. i \<le> k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<le> mod_type_class.from_nat (mod_type_class.to_nat k)

goal (2 subgoals):
 1. mod_type_class.to_nat k \<le> ncols A - 1
 2. ncols A - 1 < ncols A
[PROOF STEP]
show "to_nat k \<le> ncols A - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.to_nat k \<le> ncols A - 1
[PROOF STEP]
unfolding ncols_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.to_nat k \<le> CARD('n) - 1
[PROOF STEP]
using to_nat_less_card[of k]
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat k < CARD('n)

goal (1 subgoal):
 1. mod_type_class.to_nat k \<le> CARD('n) - 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat k \<le> ncols A - 1

goal (1 subgoal):
 1. ncols A - 1 < ncols A
[PROOF STEP]
show "ncols A - 1 < ncols A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ncols A - 1 < ncols A
[PROOF STEP]
unfolding ncols_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CARD('n) - 1 < CARD('n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ncols A - 1 < ncols A

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column i (Gram_Schmidt_matrix A)

goal (1 subgoal):
 1. i < k
[PROOF STEP]
show "i < k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < k
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < k

goal (1 subgoal):
 1. i < k
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
i < k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>ia. column i (Gram_Schmidt_upt_k A (mod_type_class.to_nat k)) = column ia (Gram_Schmidt_matrix A) \<and> ia < k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma divide_lt:
  "\<lbrakk>c *R (a::'a) < b; (c::rat) > 0 \<rbrakk> \<Longrightarrow> a < (1/c) *R b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c *R a < b; 0 < c\<rbrakk> \<Longrightarrow> a < (1 / c) *R b
[PROOF STEP]
using scaleRat_less1[of "c *R a" b "1/c"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>c *R a < b; 0 < 1 / c\<rbrakk> \<Longrightarrow> (1 / c) *R c *R a < (1 / c) *R b

goal (1 subgoal):
 1. \<lbrakk>c *R a < b; 0 < c\<rbrakk> \<Longrightarrow> a < (1 / c) *R b
[PROOF STEP]
by (simp add: scaleRat_one scaleRat_scaleRat)


[STATEMENT]
lemma minus_interval_tendsto:
  fixes x y :: "'a :: topological_group_add"
  assumes "X \<longlonglongrightarrow>\<^sub>i x" "Y \<longlonglongrightarrow>\<^sub>i y"
  shows "(\<lambda> i. X i - Y i) \<longlonglongrightarrow>\<^sub>i x - y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. X i - Y i) \<longlonglongrightarrow>\<^sub>i x - y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>i. X i - Y i) \<longlonglongrightarrow>\<^sub>i x - y
[PROOF STEP]
have *: "X i - Y i = Interval (interval.lower (X i) - interval.upper (Y i)) (interval.upper (X i) - interval.lower (Y i))" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X i - Y i = Interval (interval.lower (X i) - interval.upper (Y i)) (interval.upper (X i) - interval.lower (Y i))
[PROOF STEP]
by (cases "X i"; cases "Y i", auto)
[PROOF STATE]
proof (state)
this:
X ?i - Y ?i = Interval (interval.lower (X ?i) - interval.upper (Y ?i)) (interval.upper (X ?i) - interval.lower (Y ?i))

goal (1 subgoal):
 1. (\<lambda>i. X i - Y i) \<longlonglongrightarrow>\<^sub>i x - y
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
X \<longlonglongrightarrow>\<^sub>i x
Y \<longlonglongrightarrow>\<^sub>i y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
X \<longlonglongrightarrow>\<^sub>i x
Y \<longlonglongrightarrow>\<^sub>i y

goal (1 subgoal):
 1. (\<lambda>i. X i - Y i) \<longlonglongrightarrow>\<^sub>i x - y
[PROOF STEP]
unfolding o_def * interval_tendsto_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. interval.upper (X x)) \<longlonglongrightarrow> x \<and> (\<lambda>x. interval.lower (X x)) \<longlonglongrightarrow> x
(\<lambda>x. interval.upper (Y x)) \<longlonglongrightarrow> y \<and> (\<lambda>x. interval.lower (Y x)) \<longlonglongrightarrow> y

goal (1 subgoal):
 1. (\<lambda>x. interval.upper (Interval (interval.lower (X x) - interval.upper (Y x)) (interval.upper (X x) - interval.lower (Y x)))) \<longlonglongrightarrow> x - y \<and> (\<lambda>x. interval.lower (Interval (interval.lower (X x) - interval.upper (Y x)) (interval.upper (X x) - interval.lower (Y x)))) \<longlonglongrightarrow> x - y
[PROOF STEP]
by (auto intro: tendsto_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. X i - Y i) \<longlonglongrightarrow>\<^sub>i x - y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma type_impl_card_n: assumes "\<exists>(Rep :: 'a \<Rightarrow> nat) Abs. type_definition Rep Abs {0 ..< n :: nat}"
  shows "class.finite (TYPE('a)) \<and> CARD('a) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<exists>Rep Abs. type_definition Rep Abs {0..<n}
[PROOF STEP]
obtain rep :: "'a \<Rightarrow> nat" and abs :: "nat \<Rightarrow> 'a" where t: "type_definition rep abs {0 ..< n}"
[PROOF STATE]
proof (prove)
using this:
\<exists>Rep Abs. type_definition Rep Abs {0..<n}

goal (1 subgoal):
 1. (\<And>rep abs. type_definition rep abs {0..<n} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
type_definition rep abs {0..<n}

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
have "card (UNIV :: 'a set) = card {0 ..< n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CARD('a) = card {0..<n}
[PROOF STEP]
using t
[PROOF STATE]
proof (prove)
using this:
type_definition rep abs {0..<n}

goal (1 subgoal):
 1. CARD('a) = card {0..<n}
[PROOF STEP]
by (rule type_definition.card)
[PROOF STATE]
proof (state)
this:
CARD('a) = card {0..<n}

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
CARD('a) = card {0..<n}

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
have "\<dots> = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {0..<n} = n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card {0..<n} = n

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
CARD('a) = n
[PROOF STEP]
have bn: "CARD ('a) = n"
[PROOF STATE]
proof (prove)
using this:
CARD('a) = n

goal (1 subgoal):
 1. CARD('a) = n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
CARD('a) = n

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
have "finite (abs ` {0 ..< n})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (abs ` {0..<n})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (abs ` {0..<n})

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
finite (abs ` {0..<n})

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
have "abs ` {0 ..< n} = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs ` {0..<n} = UNIV
[PROOF STEP]
using t
[PROOF STATE]
proof (prove)
using this:
type_definition rep abs {0..<n}

goal (1 subgoal):
 1. abs ` {0..<n} = UNIV
[PROOF STEP]
by (rule type_definition.Abs_image)
[PROOF STATE]
proof (state)
this:
abs ` {0..<n} = UNIV

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
finite UNIV
[PROOF STEP]
have "class.finite (TYPE('a))"
[PROOF STATE]
proof (prove)
using this:
finite UNIV

goal (1 subgoal):
 1. class.finite TYPE('a)
[PROOF STEP]
unfolding class.finite_def
[PROOF STATE]
proof (prove)
using this:
finite UNIV

goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
class.finite TYPE('a)

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
with bn
[PROOF STATE]
proof (chain)
picking this:
CARD('a) = n
class.finite TYPE('a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
CARD('a) = n
class.finite TYPE('a)

goal (1 subgoal):
 1. class.finite TYPE('a) \<and> CARD('a) = n
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
class.finite TYPE('a) \<and> CARD('a) = n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma aprimedivisor_primepow_power:
  assumes "primepow n" "k > 0"
  shows   "aprimedivisor (n ^ k) = aprimedivisor n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
primepow n
0 < k
[PROOF STEP]
obtain p l where l: "prime p" "l > 0" "n = p ^ l"
[PROOF STATE]
proof (prove)
using this:
primepow n
0 < k

goal (1 subgoal):
 1. (\<And>p l. \<lbrakk>prime p; 0 < l; n = p ^ l\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: primepow_def)
[PROOF STATE]
proof (state)
this:
prime p
0 < l
n = p ^ l

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
from l assms
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < l
n = p ^ l
primepow n
0 < k
[PROOF STEP]
have *: "prime (aprimedivisor (n ^ k))" "aprimedivisor (n ^ k) dvd n ^ k"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < l
n = p ^ l
primepow n
0 < k

goal (1 subgoal):
 1. prime (aprimedivisor (n ^ k)) &&& aprimedivisor (n ^ k) dvd n ^ k
[PROOF STEP]
by (intro prime_aprimedivisor[of p] aprimedivisor_dvd[of p] dvd_power;
        simp add: power_mult [symmetric])+
[PROOF STATE]
proof (state)
this:
prime (aprimedivisor (n ^ k))
aprimedivisor (n ^ k) dvd n ^ k

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
from * l
[PROOF STATE]
proof (chain)
picking this:
prime (aprimedivisor (n ^ k))
aprimedivisor (n ^ k) dvd n ^ k
prime p
0 < l
n = p ^ l
[PROOF STEP]
have "aprimedivisor (n ^ k) dvd p ^ (l * k)"
[PROOF STATE]
proof (prove)
using this:
prime (aprimedivisor (n ^ k))
aprimedivisor (n ^ k) dvd n ^ k
prime p
0 < l
n = p ^ l

goal (1 subgoal):
 1. aprimedivisor (n ^ k) dvd p ^ (l * k)
[PROOF STEP]
by (simp add: power_mult)
[PROOF STATE]
proof (state)
this:
aprimedivisor (n ^ k) dvd p ^ (l * k)

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
with assms * l
[PROOF STATE]
proof (chain)
picking this:
primepow n
0 < k
prime (aprimedivisor (n ^ k))
aprimedivisor (n ^ k) dvd n ^ k
prime p
0 < l
n = p ^ l
aprimedivisor (n ^ k) dvd p ^ (l * k)
[PROOF STEP]
have "aprimedivisor (n ^ k) dvd p"
[PROOF STATE]
proof (prove)
using this:
primepow n
0 < k
prime (aprimedivisor (n ^ k))
aprimedivisor (n ^ k) dvd n ^ k
prime p
0 < l
n = p ^ l
aprimedivisor (n ^ k) dvd p ^ (l * k)

goal (1 subgoal):
 1. aprimedivisor (n ^ k) dvd p
[PROOF STEP]
by (subst (asm) prime_dvd_power_iff) simp_all
[PROOF STATE]
proof (state)
this:
aprimedivisor (n ^ k) dvd p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
with l assms
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < l
n = p ^ l
primepow n
0 < k
aprimedivisor (n ^ k) dvd p
[PROOF STEP]
have "aprimedivisor (n ^ k) = p"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < l
n = p ^ l
primepow n
0 < k
aprimedivisor (n ^ k) dvd p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = p
[PROOF STEP]
by (intro primes_dvd_imp_eq prime_aprimedivisor l) (auto simp: power_mult [symmetric])
[PROOF STATE]
proof (state)
this:
aprimedivisor (n ^ k) = p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
aprimedivisor (n ^ k) = p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
from l
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < l
n = p ^ l
[PROOF STEP]
have "aprimedivisor n dvd p ^ l"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < l
n = p ^ l

goal (1 subgoal):
 1. aprimedivisor n dvd p ^ l
[PROOF STEP]
by (auto intro: aprimedivisor_dvd simp: prime_gt_0_nat)
[PROOF STATE]
proof (state)
this:
aprimedivisor n dvd p ^ l

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
with assms l
[PROOF STATE]
proof (chain)
picking this:
primepow n
0 < k
prime p
0 < l
n = p ^ l
aprimedivisor n dvd p ^ l
[PROOF STEP]
have "aprimedivisor n dvd p"
[PROOF STATE]
proof (prove)
using this:
primepow n
0 < k
prime p
0 < l
n = p ^ l
aprimedivisor n dvd p ^ l

goal (1 subgoal):
 1. aprimedivisor n dvd p
[PROOF STEP]
by (subst (asm) prime_dvd_power_iff) (auto intro!: prime_aprimedivisor simp: prime_gt_0_nat)
[PROOF STATE]
proof (state)
this:
aprimedivisor n dvd p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
with l assms
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < l
n = p ^ l
primepow n
0 < k
aprimedivisor n dvd p
[PROOF STEP]
have "aprimedivisor n = p"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < l
n = p ^ l
primepow n
0 < k
aprimedivisor n dvd p

goal (1 subgoal):
 1. aprimedivisor n = p
[PROOF STEP]
by (intro primes_dvd_imp_eq prime_aprimedivisor l) auto
[PROOF STATE]
proof (state)
this:
aprimedivisor n = p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
aprimedivisor (n ^ k) = p
aprimedivisor n = p
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
aprimedivisor (n ^ k) = p
aprimedivisor n = p

goal (1 subgoal):
 1. aprimedivisor (n ^ k) = aprimedivisor n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
aprimedivisor (n ^ k) = aprimedivisor n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma similar_mat_sym: "similar_mat A B \<Longrightarrow> similar_mat B A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. similar_mat A B \<Longrightarrow> similar_mat B A
[PROOF STEP]
using similar_mat_wit_sym
[PROOF STATE]
proof (prove)
using this:
similar_mat_wit ?A ?B ?P ?Q \<Longrightarrow> similar_mat_wit ?B ?A ?Q ?P

goal (1 subgoal):
 1. similar_mat A B \<Longrightarrow> similar_mat B A
[PROOF STEP]
unfolding similar_mat_def
[PROOF STATE]
proof (prove)
using this:
similar_mat_wit ?A ?B ?P ?Q \<Longrightarrow> similar_mat_wit ?B ?A ?Q ?P

goal (1 subgoal):
 1. \<exists>P. Ex (similar_mat_wit A B P) \<Longrightarrow> \<exists>P. Ex (similar_mat_wit B A P)
[PROOF STEP]
by blast


[STATEMENT]
lemma take_eq_append_take_take_drop: "m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n-m) (drop m xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n - m) (drop m xs)
[PROOF STEP]
proof (induction xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. m \<le> n \<Longrightarrow> take n [] = take m [] @ take (n - m) (drop m [])
 2. \<And>a xs. \<lbrakk>m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n - m) (drop m xs); m \<le> n\<rbrakk> \<Longrightarrow> take n (a # xs) = take m (a # xs) @ take (n - m) (drop m (a # xs))
[PROOF STEP]
case (Cons a xs)
[PROOF STATE]
proof (state)
this:
m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n - m) (drop m xs)
m \<le> n

goal (2 subgoals):
 1. m \<le> n \<Longrightarrow> take n [] = take m [] @ take (n - m) (drop m [])
 2. \<And>a xs. \<lbrakk>m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n - m) (drop m xs); m \<le> n\<rbrakk> \<Longrightarrow> take n (a # xs) = take m (a # xs) @ take (n - m) (drop m (a # xs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n - m) (drop m xs)
m \<le> n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
m \<le> n \<Longrightarrow> take n xs = take m xs @ take (n - m) (drop m xs)
m \<le> n

goal (1 subgoal):
 1. take n (a # xs) = take m (a # xs) @ take (n - m) (drop m (a # xs))
[PROOF STEP]
by (metis le_add_diff_inverse take_add)
[PROOF STATE]
proof (state)
this:
take n (a # xs) = take m (a # xs) @ take (n - m) (drop m (a # xs))

goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> take n [] = take m [] @ take (n - m) (drop m [])
[PROOF STEP]
qed simp


[STATEMENT]
lemma intersect_mult_set_block_subset_card:
  assumes "blv \<in># \<B>"
  assumes "p \<in># \<Sum>\<^sub>#{# mset_set {y .y \<subseteq> blv \<inter> b2 \<and> card y = 2} .b2 \<in># (\<B> - {#blv#})#}"
  shows "card p = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card p = 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card p = 2
[PROOF STEP]
obtain b2 where "p \<in># mset_set {y . y \<subseteq> blv \<inter> b2 \<and> card y = 2} \<and> b2 \<in>#(\<B> - {#blv#})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>b2. p \<in># mset_set {y. y \<subseteq> blv \<inter> b2 \<and> card y = 2} \<and> b2 \<in># remove1_mset blv \<B> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
blv \<in># \<B>
p \<in># (\<Sum>b2\<in>#remove1_mset blv \<B>. mset_set {y. y \<subseteq> blv \<inter> b2 \<and> card y = 2})

goal (1 subgoal):
 1. (\<And>b2. p \<in># mset_set {y. y \<subseteq> blv \<inter> b2 \<and> card y = 2} \<and> b2 \<in># remove1_mset blv \<B> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
p \<in># mset_set {y. y \<subseteq> blv \<inter> b2 \<and> card y = 2} \<and> b2 \<in># remove1_mset blv \<B>

goal (1 subgoal):
 1. card p = 2
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p \<in># mset_set {y. y \<subseteq> blv \<inter> b2 \<and> card y = 2} \<and> b2 \<in># remove1_mset blv \<B>

goal (1 subgoal):
 1. card p = 2
[PROOF STEP]
by (metis (mono_tags, lifting) elem_mset_set equals0D infinite_set_mset_mset_set mem_Collect_eq)
[PROOF STATE]
proof (state)
this:
card p = 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma product_path_from_paths :
  assumes "path A (initial A) p1"
      and "path B (initial B) p2"
      and "p_io p1 = p_io p2"
    shows "path (product A B) (initial (product A B)) (zip_path p1 p2)"
      and "target (initial (product A B)) (zip_path p1 p2) = (target (initial A) p1, target (initial B) p2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) &&& target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)
 2. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
have "initial (product A B) = (initial A, initial B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FSM.initial (Product_FSM.product A B) = (FSM.initial A, FSM.initial B)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
FSM.initial (Product_FSM.product A B) = (FSM.initial A, FSM.initial B)

goal (2 subgoals):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)
 2. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
FSM.initial (Product_FSM.product A B) = (FSM.initial A, FSM.initial B)
[PROOF STEP]
have "(initial A, initial B) \<in> states (product A B)"
[PROOF STATE]
proof (prove)
using this:
FSM.initial (Product_FSM.product A B) = (FSM.initial A, FSM.initial B)

goal (1 subgoal):
 1. (FSM.initial A, FSM.initial B) \<in> FSM.states (Product_FSM.product A B)
[PROOF STEP]
by (metis fsm_initial)
[PROOF STATE]
proof (state)
this:
(FSM.initial A, FSM.initial B) \<in> FSM.states (Product_FSM.product A B)

goal (2 subgoals):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)
 2. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
have "length p1 = length p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length p1 = length p2
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
p_io p1 = p_io p2

goal (1 subgoal):
 1. length p1 = length p2
[PROOF STEP]
using map_eq_imp_length_eq
[PROOF STATE]
proof (prove)
using this:
p_io p1 = p_io p2
map ?f ?xs = map ?g ?ys \<Longrightarrow> length ?xs = length ?ys

goal (1 subgoal):
 1. length p1 = length p2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
length p1 = length p2

goal (2 subgoals):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)
 2. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length p1 = length p2
[PROOF STEP]
have c: "path (product A B) (initial (product A B)) (zip_path p1 p2)
                \<and> target (initial (product A B)) (zip_path p1 p2) = (target (initial A) p1, target (initial B) p2)"
[PROOF STATE]
proof (prove)
using this:
length p1 = length p2

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length p1 = length p2
path A (FSM.initial A) p1
path B (FSM.initial B) p2
p_io p1 = p_io p2

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
proof (induction p1 p2 rule: rev_induct2)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>path A (FSM.initial A) []; path B (FSM.initial B) []; p_io [] = p_io []\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
path A (FSM.initial A) []
path B (FSM.initial B) []
p_io [] = p_io []

goal (2 subgoals):
 1. \<lbrakk>path A (FSM.initial A) []; path B (FSM.initial B) []; p_io [] = p_io []\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path A (FSM.initial A) []
path B (FSM.initial B) []
p_io [] = p_io []
[PROOF STEP]
have "path (product A B) (initial (product A B)) (zip_path [] [])"
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) []
path B (FSM.initial B) []
p_io [] = p_io []

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] [])
[PROOF STEP]
using \<open>initial (product A B) = (initial A, initial B)\<close> \<open>(initial A, initial B) \<in> states (product A B)\<close>
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) []
path B (FSM.initial B) []
p_io [] = p_io []
FSM.initial (Product_FSM.product A B) = (FSM.initial A, FSM.initial B)
(FSM.initial A, FSM.initial B) \<in> FSM.states (Product_FSM.product A B)

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] [])
[PROOF STEP]
by (metis Nil_is_map_conv path.nil zip_Nil)
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] [])

goal (2 subgoals):
 1. \<lbrakk>path A (FSM.initial A) []; path B (FSM.initial B) []; p_io [] = p_io []\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] [])

goal (2 subgoals):
 1. \<lbrakk>path A (FSM.initial A) []; path B (FSM.initial B) []; p_io [] = p_io []\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "target (initial (product A B)) (zip_path [] []) = (target (initial A) [], target (initial B) [])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
[PROOF STEP]
using \<open>initial (product A B) = (initial A, initial B)\<close>
[PROOF STATE]
proof (prove)
using this:
FSM.initial (Product_FSM.product A B) = (FSM.initial A, FSM.initial B)

goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])

goal (2 subgoals):
 1. \<lbrakk>path A (FSM.initial A) []; path B (FSM.initial B) []; p_io [] = p_io []\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] [])
target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] [])
target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path [] []) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path [] []) = (target (FSM.initial A) [], target (FSM.initial B) [])

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
case (snoc x xs y ys)
[PROOF STATE]
proof (state)
this:
length xs = length ys
\<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)
path A (FSM.initial A) (xs @ [x])
path B (FSM.initial B) (ys @ [y])
p_io (xs @ [x]) = p_io (ys @ [y])

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "path A (initial A) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path A (FSM.initial A) xs
[PROOF STEP]
using snoc.prems(1)
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) (xs @ [x])

goal (1 subgoal):
 1. path A (FSM.initial A) xs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path A (FSM.initial A) xs

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path A (FSM.initial A) xs

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "path B (initial B) ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path B (FSM.initial B) ys
[PROOF STEP]
using snoc.prems(2)
[PROOF STATE]
proof (prove)
using this:
path B (FSM.initial B) (ys @ [y])

goal (1 subgoal):
 1. path B (FSM.initial B) ys
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path B (FSM.initial B) ys

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path B (FSM.initial B) ys

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "p_io xs = p_io ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p_io xs = p_io ys
[PROOF STEP]
using snoc.prems(3)
[PROOF STATE]
proof (prove)
using this:
p_io (xs @ [x]) = p_io (ys @ [y])

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

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path A (FSM.initial A) xs
path B (FSM.initial B) ys
p_io xs = p_io ys
[PROOF STEP]
have *:"path (product A B) (initial (product A B)) (zip_path xs ys)"
                and **:"target (initial (product A B)) (zip_path xs ys) = (target (initial A) xs, target (initial B) ys)"
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) xs
path B (FSM.initial B) ys
p_io xs = p_io ys

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) &&& target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)
[PROOF STEP]
using snoc.IH
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) xs
path B (FSM.initial B) ys
p_io xs = p_io ys
\<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) &&& target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys)
target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys)
target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)
[PROOF STEP]
have "(target (initial A) xs, target (initial B) ys) \<in> states (product A B)"
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys)
target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)

goal (1 subgoal):
 1. (target (FSM.initial A) xs, target (FSM.initial B) ys) \<in> FSM.states (Product_FSM.product A B)
[PROOF STEP]
by (metis (no_types, lifting) path_target_is_state)
[PROOF STATE]
proof (state)
this:
(target (FSM.initial A) xs, target (FSM.initial B) ys) \<in> FSM.states (Product_FSM.product A B)

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(target (FSM.initial A) xs, target (FSM.initial B) ys) \<in> FSM.states (Product_FSM.product A B)
[PROOF STEP]
have "(t_source x, t_source y) \<in> states (product A B)"
[PROOF STATE]
proof (prove)
using this:
(target (FSM.initial A) xs, target (FSM.initial B) ys) \<in> FSM.states (Product_FSM.product A B)

goal (1 subgoal):
 1. (t_source x, t_source y) \<in> FSM.states (Product_FSM.product A B)
[PROOF STEP]
using snoc.prems(1-2)
[PROOF STATE]
proof (prove)
using this:
(target (FSM.initial A) xs, target (FSM.initial B) ys) \<in> FSM.states (Product_FSM.product A B)
path A (FSM.initial A) (xs @ [x])
path B (FSM.initial B) (ys @ [y])

goal (1 subgoal):
 1. (t_source x, t_source y) \<in> FSM.states (Product_FSM.product A B)
[PROOF STEP]
by (metis path_cons_elim path_suffix)
[PROOF STATE]
proof (state)
this:
(t_source x, t_source y) \<in> FSM.states (Product_FSM.product A B)

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "x \<in> transitions A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> FSM.transitions A
[PROOF STEP]
using snoc.prems(1)
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) (xs @ [x])

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

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x \<in> FSM.transitions A

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "y \<in> transitions B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> FSM.transitions B
[PROOF STEP]
using snoc.prems(2)
[PROOF STATE]
proof (prove)
using this:
path B (FSM.initial B) (ys @ [y])

goal (1 subgoal):
 1. y \<in> FSM.transitions B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y \<in> FSM.transitions B

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
y \<in> FSM.transitions B

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "t_input x = t_input y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_input x = t_input y
[PROOF STEP]
using snoc.prems(3)
[PROOF STATE]
proof (prove)
using this:
p_io (xs @ [x]) = p_io (ys @ [y])

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

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
t_input x = t_input y

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "t_output x = t_output y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_output x = t_output y
[PROOF STEP]
using snoc.prems(3)
[PROOF STATE]
proof (prove)
using this:
p_io (xs @ [x]) = p_io (ys @ [y])

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

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x \<in> FSM.transitions A
y \<in> FSM.transitions B
t_input x = t_input y
t_output x = t_output y
[PROOF STEP]
have "((t_source x, t_source y), t_input x, t_output x, (t_target x, t_target y)) \<in> transitions (product A B)"
[PROOF STATE]
proof (prove)
using this:
x \<in> FSM.transitions A
y \<in> FSM.transitions B
t_input x = t_input y
t_output x = t_output y

goal (1 subgoal):
 1. ((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
[PROOF STEP]
unfolding product_transitions_alt_def
[PROOF STATE]
proof (prove)
using this:
x \<in> FSM.transitions A
y \<in> FSM.transitions B
t_input x = t_input y
t_output x = t_output y

goal (1 subgoal):
 1. ((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<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 A \<and> tB \<in> FSM.transitions B \<and> t_input tA = t_input tB \<and> t_output tA = t_output tB}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "t_source x = target (initial A) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_source x = target (FSM.initial A) xs
[PROOF STEP]
using snoc.prems(1)
[PROOF STATE]
proof (prove)
using this:
path A (FSM.initial A) (xs @ [x])

goal (1 subgoal):
 1. t_source x = target (FSM.initial A) xs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t_source x = target (FSM.initial A) xs

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
t_source x = target (FSM.initial A) xs

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "t_source y = target (initial B) ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_source y = target (FSM.initial B) ys
[PROOF STEP]
using snoc.prems(2)
[PROOF STATE]
proof (prove)
using this:
path B (FSM.initial B) (ys @ [y])

goal (1 subgoal):
 1. t_source y = target (FSM.initial B) ys
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t_source y = target (FSM.initial B) ys

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
t_source x = target (FSM.initial A) xs
t_source y = target (FSM.initial B) ys
[PROOF STEP]
have "((target (initial A) xs, target (initial B) ys), t_input x, t_output x, (t_target x, t_target y)) \<in> transitions (product A B)"
[PROOF STATE]
proof (prove)
using this:
((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
t_source x = target (FSM.initial A) xs
t_source y = target (FSM.initial B) ys

goal (1 subgoal):
 1. ((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
[PROOF STEP]
using \<open>(t_source x, t_source y) \<in> states (product A B)\<close>
[PROOF STATE]
proof (prove)
using this:
((t_source x, t_source y), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
t_source x = target (FSM.initial A) xs
t_source y = target (FSM.initial B) ys
(t_source x, t_source y) \<in> FSM.states (Product_FSM.product A B)

goal (1 subgoal):
 1. ((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
[PROOF STEP]
have ***: "path (product A B) (initial (product A B)) ((zip_path xs ys)@[((target (initial A) xs, target (initial B) ys), t_input x, t_output x, (t_target x, t_target y))])"
[PROOF STATE]
proof (prove)
using this:
((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)])
[PROOF STEP]
using * **
[PROOF STATE]
proof (prove)
using this:
((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y) \<in> FSM.transitions (Product_FSM.product A B)
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys)
target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys)

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)])
[PROOF STEP]
by (metis (no_types, lifting) fst_conv path_append_transition)
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)])

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "t_target x = target (initial A) (xs@[x])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_target x = target (FSM.initial A) (xs @ [x])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t_target x = target (FSM.initial A) (xs @ [x])

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
t_target x = target (FSM.initial A) (xs @ [x])

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "t_target y = target (initial B) (ys@[y])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_target y = target (FSM.initial B) (ys @ [y])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t_target y = target (FSM.initial B) (ys @ [y])

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
t_target x = target (FSM.initial A) (xs @ [x])
t_target y = target (FSM.initial B) (ys @ [y])
[PROOF STEP]
have ****: "target (initial (product A B)) ((zip_path xs ys)@[((target (initial A) xs, target (initial B) ys), t_input x, t_output x, (t_target x, t_target y))])
                            = (target (initial A) (xs@[x]), target (initial B) (ys@[y]))"
[PROOF STATE]
proof (prove)
using this:
t_target x = target (FSM.initial A) (xs @ [x])
t_target y = target (FSM.initial B) (ys @ [y])

goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "(zip_path [x] [y]) = [((target (initial A) xs, target (initial B) ys), t_input x, t_output x, (t_target x, t_target y))]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zip_path [x] [y] = [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
[PROOF STEP]
using \<open>t_source x = target (initial A) xs\<close> \<open>t_source y = target (initial B) ys\<close>
[PROOF STATE]
proof (prove)
using this:
t_source x = target (FSM.initial A) xs
t_source y = target (FSM.initial B) ys

goal (1 subgoal):
 1. zip_path [x] [y] = [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
zip_path [x] [y] = [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
zip_path [x] [y] = [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "(zip_path (xs @ [x]) (ys @ [y])) = (zip_path xs ys)@(zip_path [x] [y])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ zip_path [x] [y]
[PROOF STEP]
using zip_path_last[of xs ys x y, OF snoc.hyps]
[PROOF STATE]
proof (prove)
using this:
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ zip_path [x] [y]

goal (1 subgoal):
 1. zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ zip_path [x] [y]
[PROOF STEP]
by assumption
[PROOF STATE]
proof (state)
this:
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ zip_path [x] [y]

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
zip_path [x] [y] = [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ zip_path [x] [y]
[PROOF STEP]
have *****:"(zip_path (xs@[x]) (ys@[y]))
                            = (zip_path xs ys)@[((target (initial A) xs, target (initial B) ys), t_input x, t_output x, (t_target x, t_target y))]"
[PROOF STATE]
proof (prove)
using this:
zip_path [x] [y] = [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ zip_path [x] [y]

goal (1 subgoal):
 1. zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
[PROOF STEP]
have "path (product A B) (initial (product A B)) (zip_path (xs@[x]) (ys@[y]))"
[PROOF STATE]
proof (prove)
using this:
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y]))
[PROOF STEP]
using ***
[PROOF STATE]
proof (prove)
using this:
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)])

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y]))
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y]))

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y]))

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
have "target (initial (product A B)) (zip_path (xs@[x]) (ys@[y]))
                      = (target (initial A) (xs@[x]), target (initial B) (ys@[y]))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
using **** *****
[PROOF STATE]
proof (prove)
using this:
target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
zip_path (xs @ [x]) (ys @ [y]) = zip_path xs ys @ [((target (FSM.initial A) xs, target (FSM.initial B) ys), t_input x, t_output x, t_target x, t_target y)]

goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))

goal (1 subgoal):
 1. \<And>x xs y ys. \<lbrakk>length xs = length ys; \<lbrakk>path A (FSM.initial A) xs; path B (FSM.initial B) ys; p_io xs = p_io ys\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path xs ys) = (target (FSM.initial A) xs, target (FSM.initial B) ys); path A (FSM.initial A) (xs @ [x]); path B (FSM.initial B) (ys @ [y]); p_io (xs @ [x]) = p_io (ys @ [y])\<rbrakk> \<Longrightarrow> path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y]))
target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y]))
target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path (xs @ [x]) (ys @ [y])) = (target (FSM.initial A) (xs @ [x]), target (FSM.initial B) (ys @ [y]))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)

goal (2 subgoals):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)
 2. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
from c
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
show "path (product A B) (initial (product A B)) (zip_path p1 p2)"
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)

goal (1 subgoal):
 1. path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2)

goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
from c
[PROOF STATE]
proof (chain)
picking this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
show "target (initial (product A B)) (zip_path p1 p2)
                  = (target (initial A) p1, target (initial B) p2)"
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product A B) (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) \<and> target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)

goal (1 subgoal):
 1. target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
target (FSM.initial (Product_FSM.product A B)) (zip_path p1 p2) = (target (FSM.initial A) p1, target (FSM.initial B) p2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cnf_form_semantics:
  fixes F :: "'a formula"
  assumes nnf: "is_nnf F"
  shows "\<A> \<Turnstile> cnf_form_of F \<longleftrightarrow> \<A> \<Turnstile> F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
define cnf_semantics_list
    where "cnf_semantics_list \<A> S \<longleftrightarrow> (\<forall>s \<in> set S. \<exists>l \<in> set s. lit_semantics \<A> (l :: 'a literal))"
    for \<A> S
[PROOF STATE]
proof (state)
this:
cnf_semantics_list ?\<A> ?S = (\<forall>s\<in>set ?S. \<exists>l\<in>set s. lit_semantics ?\<A> l)

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
have tcn: "cnf F = set (map set (cnf_lists F))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cnf F = set (map set (cnf_lists F))
[PROOF STEP]
using nnf
[PROOF STATE]
proof (prove)
using this:
is_nnf F

goal (1 subgoal):
 1. cnf F = set (map set (cnf_lists F))
[PROOF STEP]
by(induction F rule: cnf.induct) (auto simp add: image_UN image_comp comp_def )
[PROOF STATE]
proof (state)
this:
cnf F = set (map set (cnf_lists F))

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
have "\<A> \<Turnstile> F \<longleftrightarrow> cnf_semantics \<A> (cnf F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<A> \<Turnstile> F = cnf_semantics \<A> (cnf F)
[PROOF STEP]
using cnf_semantics[OF nnf]
[PROOF STATE]
proof (prove)
using this:
cnf_semantics ?\<A> (cnf F) = ?\<A> \<Turnstile> F

goal (1 subgoal):
 1. \<A> \<Turnstile> F = cnf_semantics \<A> (cnf F)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<A> \<Turnstile> F = cnf_semantics \<A> (cnf F)

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<A> \<Turnstile> F = cnf_semantics \<A> (cnf F)

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
have "\<dots> = cnf_semantics \<A> (set (map set (cnf_lists F)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cnf_semantics \<A> (cnf F) = cnf_semantics \<A> (set (map set (cnf_lists F)))
[PROOF STEP]
unfolding tcn
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cnf_semantics \<A> (set (map set (cnf_lists F))) = cnf_semantics \<A> (set (map set (cnf_lists F)))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
cnf_semantics \<A> (cnf F) = cnf_semantics \<A> (set (map set (cnf_lists F)))

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cnf_semantics \<A> (cnf F) = cnf_semantics \<A> (set (map set (cnf_lists F)))

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
have "\<dots> = cnf_semantics_list \<A> (cnf_lists F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cnf_semantics \<A> (set (map set (cnf_lists F))) = cnf_semantics_list \<A> (cnf_lists F)
[PROOF STEP]
unfolding cnf_semantics_def clause_semantics_def cnf_semantics_list_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>C\<in>set (map set (cnf_lists F)). \<exists>L\<in>C. lit_semantics \<A> L) = (\<forall>s\<in>set (cnf_lists F). Bex (set s) (lit_semantics \<A>))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
cnf_semantics \<A> (set (map set (cnf_lists F))) = cnf_semantics_list \<A> (cnf_lists F)

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cnf_semantics \<A> (set (map set (cnf_lists F))) = cnf_semantics_list \<A> (cnf_lists F)

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
have "\<dots> = \<A> \<Turnstile> (cnf_form_of F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cnf_semantics_list \<A> (cnf_lists F) = \<A> \<Turnstile> cnf_form_of F
[PROOF STEP]
using nnf
[PROOF STATE]
proof (prove)
using this:
is_nnf F

goal (1 subgoal):
 1. cnf_semantics_list \<A> (cnf_lists F) = \<A> \<Turnstile> cnf_form_of F
[PROOF STEP]
by(induction F rule: cnf_lists.induct;
       simp add: cnf_semantics_list_def cnf_form_of_defs  ball_Un bex_Un)
[PROOF STATE]
proof (state)
this:
cnf_semantics_list \<A> (cnf_lists F) = \<A> \<Turnstile> cnf_form_of F

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<A> \<Turnstile> F = \<A> \<Turnstile> cnf_form_of F
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<A> \<Turnstile> F = \<A> \<Turnstile> cnf_form_of F

goal (1 subgoal):
 1. \<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<A> \<Turnstile> cnf_form_of F = \<A> \<Turnstile> F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trunc_ell2_union_disjoint: \<open>M\<inter>N = {} \<Longrightarrow> trunc_ell2 (M \<union> N) \<psi> = trunc_ell2 M \<psi> + trunc_ell2 N \<psi>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<inter> N = {} \<Longrightarrow> trunc_ell2 (M \<union> N) \<psi> = trunc_ell2 M \<psi> + trunc_ell2 N \<psi>
[PROOF STEP]
by (simp add: trunc_ell2_union)


[STATEMENT]
lemma (in ring_of_sets) outer_measure_le:
  assumes pos: "positive M f" and inc: "increasing M f" and A: "range A \<subseteq> M" and X: "X \<subseteq> (\<Union>i. A i)"
  shows "outer_measure M f X \<le> (\<Sum>i. f (A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outer_measure M f X \<le> (\<Sum>i. f (A i))
[PROOF STEP]
unfolding outer_measure_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF A\<in>{A. range A \<subseteq> M \<and> disjoint_family A \<and> X \<subseteq> \<Union> (range A)}. \<Sum>i. f (A i)) \<le> (\<Sum>i. f (A i))
[PROOF STEP]
proof (safe intro!: INF_lower2[of "disjointed A"] del: subsetI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. range (disjointed A) \<subseteq> M
 2. disjoint_family (disjointed A)
 3. X \<subseteq> \<Union> (range (disjointed A))
 4. (\<Sum>i. f (disjointed A i)) \<le> (\<Sum>i. f (A i))
[PROOF STEP]
show dA: "range (disjointed A) \<subseteq> M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (disjointed A) \<subseteq> M
[PROOF STEP]
by (auto intro!: A range_disjointed_sets)
[PROOF STATE]
proof (state)
this:
range (disjointed A) \<subseteq> M

goal (3 subgoals):
 1. disjoint_family (disjointed A)
 2. X \<subseteq> \<Union> (range (disjointed A))
 3. (\<Sum>i. f (disjointed A i)) \<le> (\<Sum>i. f (A i))
[PROOF STEP]
have "\<forall>n. f (disjointed A n) \<le> f (A n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. f (disjointed A n) \<le> f (A n)
[PROOF STEP]
by (metis increasingD [OF inc] UNIV_I dA image_subset_iff disjointed_subset A)
[PROOF STATE]
proof (state)
this:
\<forall>n. f (disjointed A n) \<le> f (A n)

goal (3 subgoals):
 1. disjoint_family (disjointed A)
 2. X \<subseteq> \<Union> (range (disjointed A))
 3. (\<Sum>i. f (disjointed A i)) \<le> (\<Sum>i. f (A i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>n. f (disjointed A n) \<le> f (A n)
[PROOF STEP]
show "(\<Sum>i. f (disjointed A i)) \<le> (\<Sum>i. f (A i))"
[PROOF STATE]
proof (prove)
using this:
\<forall>n. f (disjointed A n) \<le> f (A n)

goal (1 subgoal):
 1. (\<Sum>i. f (disjointed A i)) \<le> (\<Sum>i. f (A i))
[PROOF STEP]
by (blast intro!: suminf_le)
[PROOF STATE]
proof (state)
this:
(\<Sum>i. f (disjointed A i)) \<le> (\<Sum>i. f (A i))

goal (2 subgoals):
 1. disjoint_family (disjointed A)
 2. X \<subseteq> \<Union> (range (disjointed A))
[PROOF STEP]
qed (auto simp: X UN_disjointed_eq disjoint_family_disjointed)


[STATEMENT]
lemma coplanar_perm_1:
  assumes "Coplanar A B C D"
  shows "Coplanar A B D C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A B D C
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Coplanar A B D C
[PROOF STEP]
obtain X where P1: "(Col A B X \<and> Col C D X) \<or> (Col A C X \<and> Col B D X) \<or> (Col A D X \<and> Col B C X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Coplanar_def assms
[PROOF STATE]
proof (prove)
using this:
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Coplanar A B C D

goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar A B D C
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar A B D C
[PROOF STEP]
using Coplanar_def col_permutation_4
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Col ?A ?B ?C \<Longrightarrow> Col ?B ?A ?C

goal (1 subgoal):
 1. Coplanar A B D C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A B D C

goal:
No subgoals!
[PROOF STEP]
qed