[STATEMENT]
lemma language_equivalence_from_isomorphism_reachable :
  assumes "bij_betw f (reachable_states M1) (reachable_states M2)"
  and     "f (initial M1) = initial M2"
  and     "\<And> q x y q' . q \<in> reachable_states M1 \<Longrightarrow> q' \<in> reachable_states M1 \<Longrightarrow> (q,x,y,q') \<in> transitions M1 \<longleftrightarrow> (f q,x,y,f q') \<in> transitions M2"
shows "L M1 = L M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L M1 = L M2
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. L M1 \<subseteq> L M2
 2. L M2 \<subseteq> L M1
[PROOF STEP]
show "L M1 \<subseteq> L M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L M1 \<subseteq> L M2
[PROOF STEP]
using language_equivalence_from_isomorphism_helper_reachable[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>q x y q'. \<lbrakk>q \<in> reachable_states M1; q' \<in> reachable_states M1\<rbrakk> \<Longrightarrow> q \<in> reachable_states M1; \<And>q x y q'. \<lbrakk>q \<in> reachable_states M1; q' \<in> reachable_states M1\<rbrakk> \<Longrightarrow> q' \<in> reachable_states M1\<rbrakk> \<Longrightarrow> L M1 \<subseteq> L M2

goal (1 subgoal):
 1. L M1 \<subseteq> L M2
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
L M1 \<subseteq> L M2

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
have "bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)
[PROOF STEP]
using bij_betw_inv_into[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
have "(inv_into (reachable_states M1) f) (initial M2) = (initial M1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1
[PROOF STEP]
using assms(1,2) reachable_states_initial
[PROOF STATE]
proof (prove)
using this:
bij_betw f (reachable_states M1) (reachable_states M2)
f (FSM.initial M1) = FSM.initial M2
FSM.initial ?M \<in> reachable_states ?M

goal (1 subgoal):
 1. inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1
[PROOF STEP]
by (metis bij_betw_inv_into_left)
[PROOF STATE]
proof (state)
this:
inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
have "\<And> q x y q' . q \<in> reachable_states M2 \<Longrightarrow> q' \<in> reachable_states M2 \<Longrightarrow> (q,x,y,q') \<in> transitions M2 \<longleftrightarrow> ((inv_into (reachable_states M1) f) q,x,y,(inv_into (reachable_states M1) f) q') \<in> transitions M1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2\<rbrakk> \<Longrightarrow> ((q, x, y, q') \<in> FSM.transitions M2) = ((inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (q, x, y, q') \<in> FSM.transitions M2\<rbrakk> \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
 2. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1\<rbrakk> \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
fix q x y q'
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (q, x, y, q') \<in> FSM.transitions M2\<rbrakk> \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
 2. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1\<rbrakk> \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
assume "q \<in> reachable_states M2" and "q' \<in> reachable_states M2"
[PROOF STATE]
proof (state)
this:
q \<in> reachable_states M2
q' \<in> reachable_states M2

goal (2 subgoals):
 1. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (q, x, y, q') \<in> FSM.transitions M2\<rbrakk> \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
 2. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1\<rbrakk> \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
show "(q,x,y,q') \<in> transitions M2 \<Longrightarrow> ((inv_into (reachable_states M1) f) q,x,y,(inv_into (reachable_states M1) f) q') \<in> transitions M1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
assume a1: "(q, x, y, q') \<in> FSM.transitions M2"
[PROOF STATE]
proof (state)
this:
(q, x, y, q') \<in> FSM.transitions M2

goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
have f2: "\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. (b::'b) \<notin> B \<or> (f b::'a) \<in> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
[PROOF STEP]
using bij_betwE
[PROOF STATE]
proof (prove)
using this:
bij_betw ?f ?A ?B \<Longrightarrow> \<forall>a\<in>?A. ?f a \<in> ?B

goal (1 subgoal):
 1. \<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)

goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
[PROOF STEP]
have f3: "inv_into (FSM.reachable_states M1) f q \<in> FSM.reachable_states M1"
[PROOF STATE]
proof (prove)
using this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)

goal (1 subgoal):
 1. inv_into (reachable_states M1) f q \<in> reachable_states M1
[PROOF STEP]
using \<open>q \<in> FSM.reachable_states M2\<close> calculation(1)
[PROOF STATE]
proof (prove)
using this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
q \<in> reachable_states M2
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. inv_into (reachable_states M1) f q \<in> reachable_states M1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inv_into (reachable_states M1) f q \<in> reachable_states M1

goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
have "inv_into (FSM.reachable_states M1) f q' \<in> FSM.reachable_states M1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv_into (reachable_states M1) f q' \<in> reachable_states M1
[PROOF STEP]
using f2 \<open>q' \<in> FSM.reachable_states M2\<close> calculation(1)
[PROOF STATE]
proof (prove)
using this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
q' \<in> reachable_states M2
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. inv_into (reachable_states M1) f q' \<in> reachable_states M1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inv_into (reachable_states M1) f q' \<in> reachable_states M1

goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inv_into (reachable_states M1) f q' \<in> reachable_states M1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
inv_into (reachable_states M1) f q' \<in> reachable_states M1

goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
using f3 a1 \<open>q \<in> FSM.reachable_states M2\<close> \<open>q' \<in> FSM.reachable_states M2\<close> assms(1) assms(3) bij_betw_inv_into_right
[PROOF STATE]
proof (prove)
using this:
inv_into (reachable_states M1) f q' \<in> reachable_states M1
inv_into (reachable_states M1) f q \<in> reachable_states M1
(q, x, y, q') \<in> FSM.transitions M2
q \<in> reachable_states M2
q' \<in> reachable_states M2
bij_betw f (reachable_states M1) (reachable_states M2)
\<lbrakk>?q \<in> reachable_states M1; ?q' \<in> reachable_states M1\<rbrakk> \<Longrightarrow> ((?q, ?x, ?y, ?q') \<in> FSM.transitions M1) = ((f ?q, ?x, ?y, f ?q') \<in> FSM.transitions M2)
\<lbrakk>bij_betw ?f ?A ?A'; ?a' \<in> ?A'\<rbrakk> \<Longrightarrow> ?f (inv_into ?A ?f ?a') = ?a'

goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(q, x, y, q') \<in> FSM.transitions M2 \<Longrightarrow> (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1

goal (1 subgoal):
 1. \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2; (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1\<rbrakk> \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
show "((inv_into (reachable_states M1) f) q,x,y,(inv_into (reachable_states M1) f) q') \<in> transitions M1 \<Longrightarrow> (q,x,y,q') \<in> transitions M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
assume a1: "(inv_into (FSM.reachable_states M1) f q, x, y, inv_into (FSM.reachable_states M1) f q') \<in> FSM.transitions M1"
[PROOF STATE]
proof (state)
this:
(inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1

goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
have f2: "\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. (b::'b) \<notin> B \<or> (f b::'a) \<in> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
[PROOF STEP]
by (metis (full_types) bij_betwE)
[PROOF STATE]
proof (state)
this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)

goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
[PROOF STEP]
have f3: "inv_into (FSM.reachable_states M1) f q' \<in> FSM.reachable_states M1"
[PROOF STATE]
proof (prove)
using this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)

goal (1 subgoal):
 1. inv_into (reachable_states M1) f q' \<in> reachable_states M1
[PROOF STEP]
using \<open>q' \<in> FSM.reachable_states M2\<close> calculation(1)
[PROOF STATE]
proof (prove)
using this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
q' \<in> reachable_states M2
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. inv_into (reachable_states M1) f q' \<in> reachable_states M1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inv_into (reachable_states M1) f q' \<in> reachable_states M1

goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
have "inv_into (FSM.reachable_states M1) f q \<in> FSM.reachable_states M1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv_into (reachable_states M1) f q \<in> reachable_states M1
[PROOF STEP]
using f2 \<open>q \<in> FSM.reachable_states M2\<close> calculation(1)
[PROOF STATE]
proof (prove)
using this:
\<forall>f B A. \<not> bij_betw f B A \<or> (\<forall>b. b \<notin> B \<or> f b \<in> A)
q \<in> reachable_states M2
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)

goal (1 subgoal):
 1. inv_into (reachable_states M1) f q \<in> reachable_states M1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inv_into (reachable_states M1) f q \<in> reachable_states M1

goal (1 subgoal):
 1. (inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inv_into (reachable_states M1) f q \<in> reachable_states M1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
inv_into (reachable_states M1) f q \<in> reachable_states M1

goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
using f3 a1 \<open>q \<in> FSM.reachable_states M2\<close> \<open>q' \<in> FSM.reachable_states M2\<close> assms(1) assms(3) bij_betw_inv_into_right
[PROOF STATE]
proof (prove)
using this:
inv_into (reachable_states M1) f q \<in> reachable_states M1
inv_into (reachable_states M1) f q' \<in> reachable_states M1
(inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1
q \<in> reachable_states M2
q' \<in> reachable_states M2
bij_betw f (reachable_states M1) (reachable_states M2)
\<lbrakk>?q \<in> reachable_states M1; ?q' \<in> reachable_states M1\<rbrakk> \<Longrightarrow> ((?q, ?x, ?y, ?q') \<in> FSM.transitions M1) = ((f ?q, ?x, ?y, f ?q') \<in> FSM.transitions M2)
\<lbrakk>bij_betw ?f ?A ?A'; ?a' \<in> ?A'\<rbrakk> \<Longrightarrow> ?f (inv_into ?A ?f ?a') = ?a'

goal (1 subgoal):
 1. (q, x, y, q') \<in> FSM.transitions M2
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(q, x, y, q') \<in> FSM.transitions M2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1 \<Longrightarrow> (q, x, y, q') \<in> FSM.transitions M2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?q \<in> reachable_states M2; ?q' \<in> reachable_states M2\<rbrakk> \<Longrightarrow> ((?q, ?x, ?y, ?q') \<in> FSM.transitions M2) = ((inv_into (reachable_states M1) f ?q, ?x, ?y, inv_into (reachable_states M1) f ?q') \<in> FSM.transitions M1)

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)
inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1
\<lbrakk>?q \<in> reachable_states M2; ?q' \<in> reachable_states M2\<rbrakk> \<Longrightarrow> ((?q, ?x, ?y, ?q') \<in> FSM.transitions M2) = ((inv_into (reachable_states M1) f ?q, ?x, ?y, inv_into (reachable_states M1) f ?q') \<in> FSM.transitions M1)
[PROOF STEP]
show "L M2 \<subseteq> L M1"
[PROOF STATE]
proof (prove)
using this:
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)
inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1
\<lbrakk>?q \<in> reachable_states M2; ?q' \<in> reachable_states M2\<rbrakk> \<Longrightarrow> ((?q, ?x, ?y, ?q') \<in> FSM.transitions M2) = ((inv_into (reachable_states M1) f ?q, ?x, ?y, inv_into (reachable_states M1) f ?q') \<in> FSM.transitions M1)

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
using language_equivalence_from_isomorphism_helper_reachable[of "(inv_into (reachable_states M1) f)" M2 M1]
[PROOF STATE]
proof (prove)
using this:
bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1)
inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1
\<lbrakk>?q \<in> reachable_states M2; ?q' \<in> reachable_states M2\<rbrakk> \<Longrightarrow> ((?q, ?x, ?y, ?q') \<in> FSM.transitions M2) = ((inv_into (reachable_states M1) f ?q, ?x, ?y, inv_into (reachable_states M1) f ?q') \<in> FSM.transitions M1)
\<lbrakk>bij_betw (inv_into (reachable_states M1) f) (reachable_states M2) (reachable_states M1); inv_into (reachable_states M1) f (FSM.initial M2) = FSM.initial M1; \<And>q x y q'. \<lbrakk>q \<in> reachable_states M2; q' \<in> reachable_states M2\<rbrakk> \<Longrightarrow> ((q, x, y, q') \<in> FSM.transitions M2) = ((inv_into (reachable_states M1) f q, x, y, inv_into (reachable_states M1) f q') \<in> FSM.transitions M1)\<rbrakk> \<Longrightarrow> L M2 \<subseteq> L M1

goal (1 subgoal):
 1. L M2 \<subseteq> L M1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L M2 \<subseteq> L M1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Times_mset_Diff_distrib1: "(A - B) \<times># C = A \<times># C - B \<times># C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A - B) \<times># C = A \<times># C - B \<times># C
[PROOF STEP]
by (fact Sigma_mset_Diff_distrib1)


[STATEMENT]
lemma array_idx_in_set:
  "\<lbrakk> pc < array_length ins; array_get ins pc = x \<rbrakk>
  \<Longrightarrow> x \<in> set (list_of_array ins)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pc < array_length ins; array_get ins pc = x\<rbrakk> \<Longrightarrow> x \<in> set (list_of_array ins)
[PROOF STEP]
by (induct ins) auto


[STATEMENT]
lemma Zleast:"\<lbrakk>A \<noteq> {}; A \<subseteq> Zset; LB A n\<rbrakk> \<Longrightarrow> Zleast A \<in> A \<and>
               (\<forall>x\<in>A. (Zleast A) \<le> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<noteq> {}; A \<subseteq> Zset; LB A n\<rbrakk> \<Longrightarrow> Zleast A \<in> A \<and> (\<forall>x\<in>A. Zleast A \<le> x)
[PROOF STEP]
apply (frule lbs_ex_Zleast [of "A" "n"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<noteq> {}; A \<subseteq> Zset; LB A n; \<exists>!m. m \<in> A \<and> (\<forall>x\<in>A. m \<le> x)\<rbrakk> \<Longrightarrow> Zleast A \<in> A \<and> (\<forall>x\<in>A. Zleast A \<le> x)
[PROOF STEP]
apply (simp add:Zleast_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<noteq> {}; A \<subseteq> Zset; LB A n; \<exists>!m. m \<in> A \<and> (\<forall>x\<in>A. m \<le> x)\<rbrakk> \<Longrightarrow> (THE a. a \<in> A \<and> (\<forall>x\<in>A. a \<le> x)) \<in> A \<and> (\<forall>x\<in>A. (THE a. a \<in> A \<and> (\<forall>x\<in>A. a \<le> x)) \<le> x)
[PROOF STEP]
apply (rule theI')
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<noteq> {}; A \<subseteq> Zset; LB A n; \<exists>!m. m \<in> A \<and> (\<forall>x\<in>A. m \<le> x)\<rbrakk> \<Longrightarrow> \<exists>!x. x \<in> A \<and> (\<forall>xa\<in>A. x \<le> xa)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma filterlim_at_infinity_imp_not_convergent:
  assumes "filterlim f at_infinity sequentially"
  shows "\<not> convergent f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> convergent f
[PROOF STEP]
by (rule notI, rule not_tendsto_and_filterlim_at_infinity[OF _ _ assms])
     (simp_all add: convergent_LIMSEQ_iff)


[STATEMENT]
lemma length_eq_append:
  assumes "length y = length b"
  shows "(x @ y = a @ b) \<longleftrightarrow> x=a \<and> y = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x @ y = a @ b) = (x = a \<and> y = b)
[PROOF STEP]
by (simp add: assms)


[STATEMENT]
theorem closest_pair_dist:
  assumes "1 < length ps" "(c\<^sub>0, c\<^sub>1) = closest_pair ps"
  shows "sparse (dist c\<^sub>0 c\<^sub>1) (set ps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sparse (dist (case c\<^sub>0 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case c\<^sub>1 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y))) (set ps)
[PROOF STEP]
using assms sorted_fst_def closest_pair_rec_dist[of "mergesort fst ps"] closest_pair_rec_c0_c1[of "mergesort fst ps"]
[PROOF STATE]
proof (prove)
using this:
1 < length ps
(c\<^sub>0, c\<^sub>1) = closest_pair ps
sorted_fst ?ps = sorted_wrt (\<lambda>p\<^sub>0 p\<^sub>1. fst p\<^sub>0 \<le> fst p\<^sub>1) ?ps
\<lbrakk>1 < length (mergesort fst ps); sorted_fst (mergesort fst ps); (?ys, ?c\<^sub>0, ?c\<^sub>1) = closest_pair_rec (mergesort fst ps)\<rbrakk> \<Longrightarrow> sparse (dist (case ?c\<^sub>0 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case ?c\<^sub>1 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y))) (set (mergesort fst ps))
\<lbrakk>1 < length (mergesort fst ps); distinct (mergesort fst ps); (?ys, ?c\<^sub>0, ?c\<^sub>1) = closest_pair_rec (mergesort fst ps)\<rbrakk> \<Longrightarrow> ?c\<^sub>0 \<in> set (mergesort fst ps) \<and> ?c\<^sub>1 \<in> set (mergesort fst ps) \<and> ?c\<^sub>0 \<noteq> ?c\<^sub>1

goal (1 subgoal):
 1. sparse (dist (case c\<^sub>0 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case c\<^sub>1 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y))) (set ps)
[PROOF STEP]
by (auto simp: closest_pair_simps mergesort split: prod.splits)


[STATEMENT]
theorem valid_valid_in: assumes "valid p" shows "valid_in U p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_in U p
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
valid p

goal (1 subgoal):
 1. valid_in U p
[PROOF STEP]
unfolding valid_in_def valid_def
[PROOF STATE]
proof (prove)
using this:
\<forall>i. eval i p = Det True

goal (1 subgoal):
 1. \<forall>i. range i \<subseteq> domain U \<longrightarrow> eval i p = Det True
[PROOF STEP]
by simp


[STATEMENT]
lemma directed_union:
  assumes dX: "directed X (\<sqsubseteq>)" and dY: "directed Y (\<sqsubseteq>)"
    and XY: "\<forall>x\<in>X. \<forall>y\<in>Y. \<exists>z \<in> X \<union> Y. x \<sqsubseteq> z \<and> y \<sqsubseteq> z"
  shows "directed (X \<union> Y) (\<sqsubseteq>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. directed (X \<union> Y) (\<sqsubseteq>)
[PROOF STEP]
using directedD[OF dX] directedD[OF dY] XY
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> X; ?y \<in> X\<rbrakk> \<Longrightarrow> \<exists>z\<in>X. ?x \<sqsubseteq> z \<and> ?y \<sqsubseteq> z
\<lbrakk>?x \<in> Y; ?y \<in> Y\<rbrakk> \<Longrightarrow> \<exists>z\<in>Y. ?x \<sqsubseteq> z \<and> ?y \<sqsubseteq> z
\<forall>x\<in>X. \<forall>y\<in>Y. \<exists>z\<in>X \<union> Y. x \<sqsubseteq> z \<and> y \<sqsubseteq> z

goal (1 subgoal):
 1. directed (X \<union> Y) (\<sqsubseteq>)
[PROOF STEP]
apply (intro directedI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>\<And>x y. \<lbrakk>x \<in> X; y \<in> X\<rbrakk> \<Longrightarrow> \<exists>z\<in>X. x \<sqsubseteq> z \<and> y \<sqsubseteq> z; \<And>x y. \<lbrakk>x \<in> Y; y \<in> Y\<rbrakk> \<Longrightarrow> \<exists>z\<in>Y. x \<sqsubseteq> z \<and> y \<sqsubseteq> z; \<forall>x\<in>X. \<forall>y\<in>Y. \<exists>z\<in>X \<union> Y. x \<sqsubseteq> z \<and> y \<sqsubseteq> z; x \<in> X \<union> Y; y \<in> X \<union> Y\<rbrakk> \<Longrightarrow> \<exists>z\<in>X \<union> Y. x \<sqsubseteq> z \<and> y \<sqsubseteq> z
[PROOF STEP]
by blast


[STATEMENT]
lemma construct_lhs_vector_clean:
  assumes "p \<noteq> 0"
  assumes "i < length signs"
  shows "(construct_lhs_vector p qs signs) $ i =
    card {x. poly p x = 0 \<and> ((consistent_sign_vec_copr qs x) = (nth signs i))}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat (construct_lhs_vector p qs signs $ i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. of_rat (construct_lhs_vector p qs signs $ i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
from poly_roots_finite[OF assms(1)]
[PROOF STATE]
proof (chain)
picking this:
finite {x. poly p x = 0}
[PROOF STEP]
have "finite {x. poly p x = 0}"
[PROOF STATE]
proof (prove)
using this:
finite {x. poly p x = 0}

goal (1 subgoal):
 1. finite {x. poly p x = 0}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
finite {x. poly p x = 0}

goal (1 subgoal):
 1. of_rat (construct_lhs_vector p qs signs $ i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite {x. poly p x = 0}
[PROOF STEP]
have eq: "(Collect
       ((\<lambda>v. v = signs ! i) \<circ>
        consistent_sign_vec_copr qs) \<inter>
      set (sorted_list_of_set
            {x. poly p x = 0})) =
    {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}"
[PROOF STATE]
proof (prove)
using this:
finite {x. poly p x = 0}

goal (1 subgoal):
 1. Collect ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) \<inter> set (sorted_list_of_set {x. poly p x = 0}) = {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Collect ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) \<inter> set (sorted_list_of_set {x. poly p x = 0}) = {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}

goal (1 subgoal):
 1. of_rat (construct_lhs_vector p qs signs $ i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat (construct_lhs_vector p qs signs $ i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
unfolding construct_lhs_vector_def vec_of_list_index characterize_root_list_p_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr qs) (sorted_list_of_set {x. poly p x = 0})))))) signs ! i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat (map (\<lambda>w. rat_of_nat (length (filter ((\<lambda>v. v = w) \<circ> consistent_sign_vec_copr qs) (sorted_list_of_set {x. poly p x = 0})))) signs ! i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
apply (subst nth_map[OF assms(2)])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat (rat_of_nat (length (filter ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) (sorted_list_of_set {x. poly p x = 0})))) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (filter ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) (sorted_list_of_set {x. poly p x = 0})) = card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}
[PROOF STEP]
apply (subst distinct_length_filter)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. distinct (sorted_list_of_set {x. poly p x = 0})
 2. card (Collect ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) \<inter> set (sorted_list_of_set {x. poly p x = 0})) = card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}
[PROOF STEP]
using eq
[PROOF STATE]
proof (prove)
using this:
Collect ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) \<inter> set (sorted_list_of_set {x. poly p x = 0}) = {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}

goal (2 subgoals):
 1. distinct (sorted_list_of_set {x. poly p x = 0})
 2. card (Collect ((\<lambda>v. v = signs ! i) \<circ> consistent_sign_vec_copr qs) \<inter> set (sorted_list_of_set {x. poly p x = 0})) = card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
of_rat (construct_lhs_vector p qs signs $ i) = of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pred_of_set_fold_sup:
  assumes "finite A"
  shows "pred_of_set A = Finite_Set.fold sup bot (Predicate.single ` A)" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pred_of_set A = Finite_Set.fold (\<squnion>) \<bottom> (single ` A)
[PROOF STEP]
proof (rule sym)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Finite_Set.fold (\<squnion>) \<bottom> (single ` A) = pred_of_set A
[PROOF STEP]
interpret comp_fun_idem "sup :: 'a Predicate.pred \<Rightarrow> 'a Predicate.pred \<Rightarrow> 'a Predicate.pred"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comp_fun_idem (\<squnion>)
[PROOF STEP]
by (fact comp_fun_idem_sup)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Finite_Set.fold (\<squnion>) \<bottom> (single ` A) = pred_of_set A
[PROOF STEP]
from \<open>finite A\<close>
[PROOF STATE]
proof (chain)
picking this:
finite A
[PROOF STEP]
show "?rhs = ?lhs"
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Finite_Set.fold (\<squnion>) \<bottom> (single ` A) = pred_of_set A
[PROOF STEP]
by (induct A) (auto intro!: pred_eqI)
[PROOF STATE]
proof (state)
this:
Finite_Set.fold (\<squnion>) \<bottom> (single ` A) = pred_of_set A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma right_mult_zero_mat'[simp]: "dim_col A = n \<Longrightarrow> A * 0\<^sub>m n nc = 0\<^sub>m (dim_row A) nc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col A = n \<Longrightarrow> A * 0\<^sub>m n nc = 0\<^sub>m (dim_row A) nc
[PROOF STEP]
by (rule right_mult_zero_mat, unfold carrier_mat_def, simp)


[STATEMENT]
lemma divisor_set_not_empty: fixes m::nat assumes "m \<ge>1"
  shows "m \<in> divisor_set m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<in> divisor_set m
[PROOF STEP]
using assms divisor_set divisor_def
[PROOF STATE]
proof (prove)
using this:
1 \<le> m
divisor_set ?m = {n. n divisor ?m}
?n divisor ?m \<equiv> 1 \<le> ?n \<and> ?n \<le> ?m \<and> ?n dvd ?m

goal (1 subgoal):
 1. m \<in> divisor_set m
[PROOF STEP]
by force


[STATEMENT]
lemma intersection_is_alg:
  assumes "is_algebraic R n A"
  assumes "is_algebraic R n B"
  shows "is_algebraic R n (A \<inter> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_algebraic R n (A \<inter> B)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_algebraic R n (A \<inter> B)
[PROOF STEP]
obtain as where as_def: "finite as \<and> as \<subseteq> carrier (R[\<X>\<^bsub>n\<^esub>]) \<and> A = affine_alg_set R n as"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>as. finite as \<and> as \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> A = affine_alg_set R n as \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson assms(1) is_algebraicE)
[PROOF STATE]
proof (state)
this:
finite as \<and> as \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> A = affine_alg_set R n as

goal (1 subgoal):
 1. is_algebraic R n (A \<inter> B)
[PROOF STEP]
obtain bs where bs_def: "finite bs \<and> bs \<subseteq> carrier (R[\<X>\<^bsub>n\<^esub>]) \<and> B = affine_alg_set R n bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>bs. finite bs \<and> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> B = affine_alg_set R n bs \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson assms(2) is_algebraicE)
[PROOF STATE]
proof (state)
this:
finite bs \<and> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> B = affine_alg_set R n bs

goal (1 subgoal):
 1. is_algebraic R n (A \<inter> B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_algebraic R n (A \<inter> B)
[PROOF STEP]
apply(rule is_algebraicI[of "as \<union> bs"])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. finite (as \<union> bs)
 2. as \<union> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>])
 3. A \<inter> B = affine_alg_set R n (as \<union> bs)
[PROOF STEP]
using as_def bs_def
[PROOF STATE]
proof (prove)
using this:
finite as \<and> as \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> A = affine_alg_set R n as
finite bs \<and> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> B = affine_alg_set R n bs

goal (3 subgoals):
 1. finite (as \<union> bs)
 2. as \<union> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>])
 3. A \<inter> B = affine_alg_set R n (as \<union> bs)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. as \<union> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>])
 2. A \<inter> B = affine_alg_set R n (as \<union> bs)
[PROOF STEP]
using as_def bs_def
[PROOF STATE]
proof (prove)
using this:
finite as \<and> as \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> A = affine_alg_set R n as
finite bs \<and> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>]) \<and> B = affine_alg_set R n bs

goal (2 subgoals):
 1. as \<union> bs \<subseteq> carrier (R [\<X>\<^bsub>n\<^esub>])
 2. A \<inter> B = affine_alg_set R n (as \<union> bs)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> B = affine_alg_set R n (as \<union> bs)
[PROOF STEP]
by (simp add: affine_alg_set_intersect as_def bs_def)
[PROOF STATE]
proof (state)
this:
is_algebraic R n (A \<inter> B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cong_less_imp_eq_nat: "0 \<le> a \<Longrightarrow> a < m \<Longrightarrow> 0 \<le> b \<Longrightarrow> b < m \<Longrightarrow> [a = b] (mod m) \<Longrightarrow> a = b"
  for a b :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> a; a < m; 0 \<le> b; b < m; [a = b] (mod m)\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
by (auto simp add: cong_def)


[STATEMENT]
lemma scalar_prod_smult_left[simp]:
  "dim_vec w = dim_vec v \<Longrightarrow> (k \<cdot>\<^sub>v w) \<bullet> v = (k :: 'a :: comm_semiring_0) * (w \<bullet> v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec w = dim_vec v \<Longrightarrow> (k \<cdot>\<^sub>v w) \<bullet> v = k * (w \<bullet> v)
[PROOF STEP]
unfolding scalar_prod_def sum_distrib_left
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec w = dim_vec v \<Longrightarrow> (\<Sum>i = 0..<dim_vec v. (k \<cdot>\<^sub>v w) $ i * v $ i) = (\<Sum>n = 0..<dim_vec v. k * (w $ n * v $ n))
[PROOF STEP]
by (auto intro: sum.cong simp: ac_simps)


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


[STATEMENT]
lemma partition_on_mset_sum_size_eq: "partition_on_mset A P \<Longrightarrow> (\<Sum>x \<in># P. size x) = size A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. partition_on_mset A P \<Longrightarrow> \<Sum>\<^sub># (image_mset size P) = size A
[PROOF STEP]
by (metis partition_on_msetD1 size_big_union_sum)


[STATEMENT]
lemma (in \<Z>) vfst_arrow_is_cat_Rel_iso_arr'[cat_Rel_par_set_cs_intros]:
  assumes "A \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>"
    and "b \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>"
    and "AB = A \<times>\<^sub>\<circ> set {b}"
    and "A' = A"
    and "\<CC>' = cat_Rel \<alpha>"
  shows "vfst_arrow A (set {b}) : AB \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<CC>'\<^esub> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfst_arrow A (ZFC_in_HOL.set {b}) : AB \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<CC>'\<^esub> A
[PROOF STEP]
using assms(1-2)
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. vfst_arrow A (ZFC_in_HOL.set {b}) : AB \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<CC>'\<^esub> A
[PROOF STEP]
unfolding assms(3-5)
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. vfst_arrow A (ZFC_in_HOL.set {b}) : A \<times>\<^sub>\<circ> ZFC_in_HOL.set {b} \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>cat_Rel \<alpha>\<^esub> A
[PROOF STEP]
by (rule vfst_arrow_is_cat_Rel_iso_arr)


[STATEMENT]
lemma (in finite_comm_group) iso_Characters_FactGroup:
  assumes H: "subgroup H G"
  shows "(\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in>
           iso (Characters (G Mod H)) ((Characters G)\<lparr>carrier := {\<chi>\<in>characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
interpret H: normal H G
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H \<lhd> G
[PROOF STEP]
using subgroup_imp_normal[OF H]
[PROOF STATE]
proof (prove)
using this:
H \<lhd> G

goal (1 subgoal):
 1. H \<lhd> G
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
interpret Chars: finite_comm_group "Characters G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_comm_group (Characters G)
[PROOF STEP]
by (rule finite_comm_group_Characters)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
interpret Fact: comm_group "G Mod H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comm_group (G Mod H)
[PROOF STEP]
by (simp add: H.subgroup_axioms comm_group.abelian_FactGroup comm_group_axioms)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
interpret Fact: finite_comm_group "G Mod H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_comm_group (G Mod H)
[PROOF STEP]
by unfold_locales (auto simp: carrier_FactGroup)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
define C :: "('a \<Rightarrow> complex) set" where "C = {\<chi>\<in>characters G. \<forall>x\<in>H. \<chi> x = 1}"
[PROOF STATE]
proof (state)
this:
C = {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}

goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
interpret C: subgroup C "Characters G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup C (Characters G)
[PROOF STEP]
proof (unfold_locales, goal_cases)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. C \<subseteq> carrier (Characters G)
 2. \<And>x y. \<lbrakk>x \<in> C; y \<in> C\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> C
 3. \<one>\<^bsub>Characters G\<^esub> \<in> C
 4. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:

goal (4 subgoals):
 1. C \<subseteq> carrier (Characters G)
 2. \<And>x y. \<lbrakk>x \<in> C; y \<in> C\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> C
 3. \<one>\<^bsub>Characters G\<^esub> \<in> C
 4. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<subseteq> carrier (Characters G)
[PROOF STEP]
by (auto simp: C_def one_Characters mult_Characters carrier_Characters characters_def)
[PROOF STATE]
proof (state)
this:
C \<subseteq> carrier (Characters G)

goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> C; y \<in> C\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> C
 2. \<one>\<^bsub>Characters G\<^esub> \<in> C
 3. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> C; y \<in> C\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> C
 2. \<one>\<^bsub>Characters G\<^esub> \<in> C
 3. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
x_ \<in> C
y_ \<in> C

goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> C; y \<in> C\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> C
 2. \<one>\<^bsub>Characters G\<^esub> \<in> C
 3. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
x_ \<in> C
y_ \<in> C

goal (1 subgoal):
 1. x_ \<otimes>\<^bsub>Characters G\<^esub> y_ \<in> C
[PROOF STEP]
by (auto simp: C_def one_Characters mult_Characters carrier_Characters characters_def)
[PROOF STATE]
proof (state)
this:
x_ \<otimes>\<^bsub>Characters G\<^esub> y_ \<in> C

goal (2 subgoals):
 1. \<one>\<^bsub>Characters G\<^esub> \<in> C
 2. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<one>\<^bsub>Characters G\<^esub> \<in> C
 2. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
case 3
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<one>\<^bsub>Characters G\<^esub> \<in> C
 2. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>Characters G\<^esub> \<in> C
[PROOF STEP]
by (auto simp: C_def one_Characters mult_Characters
                     carrier_Characters characters_def principal_char_def)
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>Characters G\<^esub> \<in> C

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
case (4 \<chi>)
[PROOF STATE]
proof (state)
this:
\<chi> \<in> C

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
hence "inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>"
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> C

goal (1 subgoal):
 1. inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>
[PROOF STEP]
by (subst inv_Characters') (auto simp: C_def carrier_Characters)
[PROOF STATE]
proof (state)
this:
inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
have "inv_character \<chi> \<in> characters G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv_character \<chi> \<in> characters G
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> C

goal (1 subgoal):
 1. inv_character \<chi> \<in> characters G
[PROOF STEP]
by (auto simp: C_def characters_def)
[PROOF STATE]
proof (state)
this:
inv_character \<chi> \<in> characters G

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inv_character \<chi> \<in> characters G

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
have "\<forall>x\<in>H. inv_character \<chi> x = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>H. inv_character \<chi> x = 1
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> C

goal (1 subgoal):
 1. \<forall>x\<in>H. inv_character \<chi> x = 1
[PROOF STEP]
by (auto simp: C_def inv_character_def)
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>H. inv_character \<chi> x = 1

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> inv\<^bsub>Characters G\<^esub> x \<in> C
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>
inv_character \<chi> \<in> characters G
\<forall>x\<in>H. inv_character \<chi> x = 1
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>
inv_character \<chi> \<in> characters G
\<forall>x\<in>H. inv_character \<chi> x = 1

goal (1 subgoal):
 1. inv\<^bsub>Characters G\<^esub> \<chi> \<in> C
[PROOF STEP]
by (auto simp: C_def)
[PROOF STATE]
proof (state)
this:
inv\<^bsub>Characters G\<^esub> \<chi> \<in> C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
define f :: "('a set \<Rightarrow> complex) \<Rightarrow> ('a \<Rightarrow> complex)"
    where "f = (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0)"
[PROOF STATE]
proof (state)
this:
f = (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0)

goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
have [intro]: "character G (f \<chi>)" if "character (G Mod H) \<chi>" for \<chi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character G (f \<chi>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. character G (f \<chi>)
[PROOF STEP]
interpret character "G Mod H" \<chi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character (G Mod H) \<chi>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. character G (f \<chi>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character G (f \<chi>)
[PROOF STEP]
proof (unfold_locales, goal_cases)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. f \<chi> \<one> \<noteq> 0
 2. \<And>a. a \<notin> carrier G \<Longrightarrow> f \<chi> a = 0
 3. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:

goal (3 subgoals):
 1. f \<chi> \<one> \<noteq> 0
 2. \<And>a. a \<notin> carrier G \<Longrightarrow> f \<chi> a = 0
 3. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<chi> \<one> \<noteq> 0
[PROOF STEP]
by (auto simp: f_def char_eq_0_iff carrier_FactGroup)
[PROOF STATE]
proof (state)
this:
f \<chi> \<one> \<noteq> 0

goal (2 subgoals):
 1. \<And>a. a \<notin> carrier G \<Longrightarrow> f \<chi> a = 0
 2. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a \<notin> carrier G \<Longrightarrow> f \<chi> a = 0
 2. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
case (2 x)
[PROOF STATE]
proof (state)
this:
x \<notin> carrier G

goal (2 subgoals):
 1. \<And>a. a \<notin> carrier G \<Longrightarrow> f \<chi> a = 0
 2. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
x \<notin> carrier G

goal (1 subgoal):
 1. f \<chi> x = 0
[PROOF STEP]
by (auto simp: f_def)
[PROOF STATE]
proof (state)
this:
f \<chi> x = 0

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
case (3 x y)
[PROOF STATE]
proof (state)
this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
have "\<chi> (H #> x) * \<chi> (H #> y) = \<chi> ((H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (H #> x) * \<chi> (H #> y) = \<chi> ((H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y))
[PROOF STEP]
using 3
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. \<chi> (H #> x) * \<chi> (H #> y) = \<chi> ((H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y))
[PROOF STEP]
by (intro char_mult [symmetric]) (auto simp: carrier_FactGroup)
[PROOF STATE]
proof (state)
this:
\<chi> (H #> x) * \<chi> (H #> y) = \<chi> ((H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y))

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<chi> (H #> x) * \<chi> (H #> y) = \<chi> ((H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y))

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
have "(H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y) = H #> (x \<otimes> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y) = H #> x \<otimes> y
[PROOF STEP]
using 3
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. (H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y) = H #> x \<otimes> y
[PROOF STEP]
by (simp add: H.rcos_sum)
[PROOF STATE]
proof (state)
this:
(H #> x) \<otimes>\<^bsub>G Mod H\<^esub> (H #> y) = H #> x \<otimes> y

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> f \<chi> (a \<otimes> b) = f \<chi> a * f \<chi> b
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<chi> (H #> x) * \<chi> (H #> y) = \<chi> (H #> x \<otimes> y)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<chi> (H #> x) * \<chi> (H #> y) = \<chi> (H #> x \<otimes> y)

goal (1 subgoal):
 1. f \<chi> (x \<otimes> y) = f \<chi> x * f \<chi> y
[PROOF STEP]
using 3
[PROOF STATE]
proof (prove)
using this:
\<chi> (H #> x) * \<chi> (H #> y) = \<chi> (H #> x \<otimes> y)
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. f \<chi> (x \<otimes> y) = f \<chi> x * f \<chi> y
[PROOF STEP]
by (simp add: f_def)
[PROOF STATE]
proof (state)
this:
f \<chi> (x \<otimes> y) = f \<chi> x * f \<chi> y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
character G (f \<chi>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
character (G Mod H) ?\<chi>2 \<Longrightarrow> character G (f ?\<chi>2)

goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
have [intro]: "f \<chi> \<in> C" if "character (G Mod H) \<chi>" for \<chi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
interpret \<chi>: character "G Mod H" \<chi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character (G Mod H) \<chi>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
have "character G (f \<chi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character G (f \<chi>)
[PROOF STEP]
using \<chi>.character_axioms
[PROOF STATE]
proof (prove)
using this:
character (G Mod H) \<chi>

goal (1 subgoal):
 1. character G (f \<chi>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
character G (f \<chi>)

goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
character G (f \<chi>)

goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
have "\<chi> (H #> x) = 1" if "x \<in> H" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (H #> x) = 1
[PROOF STEP]
using that H.rcos_const \<chi>.char_one
[PROOF STATE]
proof (prove)
using this:
x \<in> H
\<lbrakk>Group.group G; ?h \<in> H\<rbrakk> \<Longrightarrow> H #> ?h = H
\<chi> \<one>\<^bsub>G Mod H\<^esub> = 1

goal (1 subgoal):
 1. \<chi> (H #> x) = 1
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
?x2 \<in> H \<Longrightarrow> \<chi> (H #> ?x2) = 1

goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
character G (f \<chi>)
?x2 \<in> H \<Longrightarrow> \<chi> (H #> ?x2) = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
character G (f \<chi>)
?x2 \<in> H \<Longrightarrow> \<chi> (H #> ?x2) = 1

goal (1 subgoal):
 1. f \<chi> \<in> C
[PROOF STEP]
by (auto simp: carrier_Characters C_def characters_def f_def)
[PROOF STATE]
proof (state)
this:
f \<chi> \<in> C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
character (G Mod H) ?\<chi>2 \<Longrightarrow> f ?\<chi>2 \<in> C

goal (1 subgoal):
 1. (\<lambda>\<chi> x. if x \<in> carrier G then \<chi> (H #> x) else 0) \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := {\<chi> \<in> characters G. \<forall>x\<in>H. \<chi> x = 1}\<rparr>)
[PROOF STEP]
show "f \<in> iso (Characters (G Mod H)) ((Characters G)\<lparr>carrier := C\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := C\<rparr>)
[PROOF STEP]
proof (rule isoI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f \<in> hom (Characters (G Mod H)) (Characters G\<lparr>carrier := C\<rparr>)
 2. bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))
[PROOF STEP]
show "f \<in> hom (Characters (G Mod H)) (Characters G\<lparr>carrier := C\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> hom (Characters (G Mod H)) (Characters G\<lparr>carrier := C\<rparr>)
[PROOF STEP]
proof (rule homI, goal_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier (Characters (G Mod H)) \<Longrightarrow> f x \<in> carrier (Characters G\<lparr>carrier := C\<rparr>)
 2. \<And>x y. \<lbrakk>x \<in> carrier (Characters (G Mod H)); y \<in> carrier (Characters (G Mod H))\<rbrakk> \<Longrightarrow> f (x \<otimes>\<^bsub>Characters (G Mod H)\<^esub> y) = f x \<otimes>\<^bsub>Characters G\<lparr>carrier := C\<rparr>\<^esub> f y
[PROOF STEP]
case (1 \<chi>)
[PROOF STATE]
proof (state)
this:
\<chi> \<in> carrier (Characters (G Mod H))

goal (2 subgoals):
 1. \<And>x. x \<in> carrier (Characters (G Mod H)) \<Longrightarrow> f x \<in> carrier (Characters G\<lparr>carrier := C\<rparr>)
 2. \<And>x y. \<lbrakk>x \<in> carrier (Characters (G Mod H)); y \<in> carrier (Characters (G Mod H))\<rbrakk> \<Longrightarrow> f (x \<otimes>\<^bsub>Characters (G Mod H)\<^esub> y) = f x \<otimes>\<^bsub>Characters G\<lparr>carrier := C\<rparr>\<^esub> f y
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> carrier (Characters (G Mod H))

goal (1 subgoal):
 1. f \<chi> \<in> carrier (Characters G\<lparr>carrier := C\<rparr>)
[PROOF STEP]
by (auto simp: carrier_Characters characters_def)
[PROOF STATE]
proof (state)
this:
f \<chi> \<in> carrier (Characters G\<lparr>carrier := C\<rparr>)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters (G Mod H)); y \<in> carrier (Characters (G Mod H))\<rbrakk> \<Longrightarrow> f (x \<otimes>\<^bsub>Characters (G Mod H)\<^esub> y) = f x \<otimes>\<^bsub>Characters G\<lparr>carrier := C\<rparr>\<^esub> f y
[PROOF STEP]
qed (auto simp: f_def carrier_Characters fun_eq_iff mult_Characters)
[PROOF STATE]
proof (state)
this:
f \<in> hom (Characters (G Mod H)) (Characters G\<lparr>carrier := C\<rparr>)

goal (1 subgoal):
 1. bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))
[PROOF STEP]
have "bij_betw f (characters (G Mod H)) C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw f (characters (G Mod H)) C
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f (characters (G Mod H)) \<and> f ` characters (G Mod H) = C
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on f (characters (G Mod H))
 2. f ` characters (G Mod H) = C
[PROOF STEP]
show inj: "inj_on f (characters (G Mod H))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f (characters (G Mod H))
[PROOF STEP]
proof (rule inj_onI, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> characters (G Mod H); y \<in> characters (G Mod H); f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
case (1 \<chi>1 \<chi>2)
[PROOF STATE]
proof (state)
this:
\<chi>1 \<in> characters (G Mod H)
\<chi>2 \<in> characters (G Mod H)
f \<chi>1 = f \<chi>2

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> characters (G Mod H); y \<in> characters (G Mod H); f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
interpret \<chi>1: character "G Mod H" \<chi>1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character (G Mod H) \<chi>1
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
\<chi>1 \<in> characters (G Mod H)
\<chi>2 \<in> characters (G Mod H)
f \<chi>1 = f \<chi>2

goal (1 subgoal):
 1. character (G Mod H) \<chi>1
[PROOF STEP]
by (auto simp: characters_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> characters (G Mod H); y \<in> characters (G Mod H); f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
interpret \<chi>2: character "G Mod H" \<chi>2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character (G Mod H) \<chi>2
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
\<chi>1 \<in> characters (G Mod H)
\<chi>2 \<in> characters (G Mod H)
f \<chi>1 = f \<chi>2

goal (1 subgoal):
 1. character (G Mod H) \<chi>2
[PROOF STEP]
by (auto simp: characters_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> characters (G Mod H); y \<in> characters (G Mod H); f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "\<chi>1 H' = \<chi>2 H'" for H'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
proof (cases "H' \<in> carrier (G Mod H)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
 2. H' \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
H' \<notin> carrier (G Mod H)

goal (2 subgoals):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
 2. H' \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
H' \<notin> carrier (G Mod H)

goal (1 subgoal):
 1. \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
by (simp add: \<chi>1.char_eq_0 \<chi>2.char_eq_0)
[PROOF STATE]
proof (state)
this:
\<chi>1 H' = \<chi>2 H'

goal (1 subgoal):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
H' \<in> carrier (G Mod H)

goal (1 subgoal):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
H' \<in> carrier (G Mod H)
[PROOF STEP]
obtain x where x: "x \<in> carrier G" "H' = H #> x"
[PROOF STATE]
proof (prove)
using this:
H' \<in> carrier (G Mod H)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> carrier G; H' = H #> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: carrier_FactGroup)
[PROOF STATE]
proof (state)
this:
x \<in> carrier G
H' = H #> x

goal (1 subgoal):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
from 1
[PROOF STATE]
proof (chain)
picking this:
\<chi>1 \<in> characters (G Mod H)
\<chi>2 \<in> characters (G Mod H)
f \<chi>1 = f \<chi>2
[PROOF STEP]
have "f \<chi>1 x = f \<chi>2 x"
[PROOF STATE]
proof (prove)
using this:
\<chi>1 \<in> characters (G Mod H)
\<chi>2 \<in> characters (G Mod H)
f \<chi>1 = f \<chi>2

goal (1 subgoal):
 1. f \<chi>1 x = f \<chi>2 x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f \<chi>1 x = f \<chi>2 x

goal (1 subgoal):
 1. H' \<in> carrier (G Mod H) \<Longrightarrow> \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
with x
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier G
H' = H #> x
f \<chi>1 x = f \<chi>2 x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
H' = H #> x
f \<chi>1 x = f \<chi>2 x

goal (1 subgoal):
 1. \<chi>1 H' = \<chi>2 H'
[PROOF STEP]
by (auto simp: f_def)
[PROOF STATE]
proof (state)
this:
\<chi>1 H' = \<chi>2 H'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<chi>1 ?H'2 = \<chi>2 ?H'2

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> characters (G Mod H); y \<in> characters (G Mod H); f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
thus "\<chi>1 = \<chi>2"
[PROOF STATE]
proof (prove)
using this:
\<chi>1 ?H'2 = \<chi>2 ?H'2

goal (1 subgoal):
 1. \<chi>1 = \<chi>2
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<chi>1 = \<chi>2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on f (characters (G Mod H))

goal (1 subgoal):
 1. f ` characters (G Mod H) = C
[PROOF STEP]
have "f ` characters (G Mod H) \<subseteq> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` characters (G Mod H) \<subseteq> C
[PROOF STEP]
by (auto simp: characters_def)
[PROOF STATE]
proof (state)
this:
f ` characters (G Mod H) \<subseteq> C

goal (1 subgoal):
 1. f ` characters (G Mod H) = C
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f ` characters (G Mod H) \<subseteq> C

goal (1 subgoal):
 1. f ` characters (G Mod H) = C
[PROOF STEP]
have "C \<subseteq> f ` characters (G Mod H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<subseteq> f ` characters (G Mod H)
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
fix \<chi>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
assume \<chi>: "\<chi> \<in> C"
[PROOF STATE]
proof (state)
this:
\<chi> \<in> C

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
from \<chi>
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<in> C
[PROOF STEP]
interpret character G \<chi>
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> C

goal (1 subgoal):
 1. character G \<chi>
[PROOF STEP]
by (auto simp: C_def characters_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
have [simp]: "\<chi> x = 1" if "x \<in> H" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> x = 1
[PROOF STEP]
using \<chi> that
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> C
x \<in> H

goal (1 subgoal):
 1. \<chi> x = 1
[PROOF STEP]
by (auto simp: C_def)
[PROOF STATE]
proof (state)
this:
?x2 \<in> H \<Longrightarrow> \<chi> ?x2 = 1

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
have "\<forall>H'\<in>carrier (G Mod H). \<exists>x\<in>carrier G. H' = H #> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>H'\<in>carrier (G Mod H). \<exists>x\<in>carrier G. H' = H #> x
[PROOF STEP]
by (auto simp: carrier_FactGroup)
[PROOF STATE]
proof (state)
this:
\<forall>H'\<in>carrier (G Mod H). \<exists>x\<in>carrier G. H' = H #> x

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>H'\<in>carrier (G Mod H). \<exists>x\<in>carrier G. H' = H #> x
[PROOF STEP]
obtain h where h: "h H' \<in> carrier G" "H' = H #> h H'" if "H' \<in> carrier (G Mod H)" for H'
[PROOF STATE]
proof (prove)
using this:
\<forall>H'\<in>carrier (G Mod H). \<exists>x\<in>carrier G. H' = H #> x

goal (1 subgoal):
 1. (\<And>h. \<lbrakk>\<And>H'. H' \<in> carrier (G Mod H) \<Longrightarrow> h H' \<in> carrier G; \<And>H'. H' \<in> carrier (G Mod H) \<Longrightarrow> H' = H #> h H'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
?H'2 \<in> carrier (G Mod H) \<Longrightarrow> h ?H'2 \<in> carrier G
?H'2 \<in> carrier (G Mod H) \<Longrightarrow> ?H'2 = H #> h ?H'2

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
define \<chi>' where "\<chi>' = (\<lambda>H'. if H' \<in> carrier (G Mod H) then \<chi> (h H') else 0)"
[PROOF STATE]
proof (state)
this:
\<chi>' = (\<lambda>H'. if H' \<in> carrier (G Mod H) then \<chi> (h H') else 0)

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
have \<chi>_cong: "\<chi> x = \<chi> y" if "H #> x = H #> y" "x \<in> carrier G" "y \<in> carrier G" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
have "x \<in> H #> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> H #> x
[PROOF STEP]
by (simp add: H.subgroup_axioms rcos_self that(2))
[PROOF STATE]
proof (state)
this:
x \<in> H #> x

goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x \<in> H #> x

goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
have "\<dots> = H #> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H #> x = H #> y
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
H #> x = H #> y

goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x \<in> H #> y
[PROOF STEP]
obtain z where z: "z \<in> H" "x = z \<otimes> y"
[PROOF STATE]
proof (prove)
using this:
x \<in> H #> y

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> H; x = z \<otimes> y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding r_coset_def
[PROOF STATE]
proof (prove)
using this:
x \<in> (\<Union>h\<in>H. {h \<otimes> y})

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> H; x = z \<otimes> y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> H
x = z \<otimes> y

goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
z \<in> H
x = z \<otimes> y

goal (1 subgoal):
 1. \<chi> x = \<chi> y
[PROOF STEP]
using z H.subset that
[PROOF STATE]
proof (prove)
using this:
z \<in> H
x = z \<otimes> y
z \<in> H
x = z \<otimes> y
H \<subseteq> carrier G
H #> x = H #> y
x \<in> carrier G
y \<in> carrier G

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>H #> ?x2 = H #> ?y2; ?x2 \<in> carrier G; ?y2 \<in> carrier G\<rbrakk> \<Longrightarrow> \<chi> ?x2 = \<chi> ?y2

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
have "character (G Mod H) \<chi>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character (G Mod H) \<chi>'
[PROOF STEP]
proof (unfold_locales, goal_cases)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0
 2. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 3. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:

goal (3 subgoals):
 1. \<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0
 2. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 3. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
have H: "H \<in> carrier (G Mod H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H \<in> carrier (G Mod H)
[PROOF STEP]
using Fact.one_closed
[PROOF STATE]
proof (prove)
using this:
\<one>\<^bsub>G Mod H\<^esub> \<in> carrier (G Mod H)

goal (1 subgoal):
 1. H \<in> carrier (G Mod H)
[PROOF STEP]
unfolding one_FactGroup
[PROOF STATE]
proof (prove)
using this:
H \<in> carrier (G Mod H)

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

goal (3 subgoals):
 1. \<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0
 2. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 3. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
with h[of H]
[PROOF STATE]
proof (chain)
picking this:
H \<in> carrier (G Mod H) \<Longrightarrow> h H \<in> carrier G
H \<in> carrier (G Mod H) \<Longrightarrow> H = H #> h H
H \<in> carrier (G Mod H)
[PROOF STEP]
have "h H \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
H \<in> carrier (G Mod H) \<Longrightarrow> h H \<in> carrier G
H \<in> carrier (G Mod H) \<Longrightarrow> H = H #> h H
H \<in> carrier (G Mod H)

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

goal (3 subgoals):
 1. \<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0
 2. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 3. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
h H \<in> carrier G

goal (1 subgoal):
 1. \<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0
[PROOF STEP]
using H
[PROOF STATE]
proof (prove)
using this:
h H \<in> carrier G
H \<in> carrier (G Mod H)

goal (1 subgoal):
 1. \<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0
[PROOF STEP]
by (auto simp: char_eq_0_iff \<chi>'_def)
[PROOF STATE]
proof (state)
this:
\<chi>' \<one>\<^bsub>G Mod H\<^esub> \<noteq> 0

goal (2 subgoals):
 1. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 2. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 2. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
case (2 H')
[PROOF STATE]
proof (state)
this:
H' \<notin> carrier (G Mod H)

goal (2 subgoals):
 1. \<And>a. a \<notin> carrier (G Mod H) \<Longrightarrow> \<chi>' a = 0
 2. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
H' \<notin> carrier (G Mod H)

goal (1 subgoal):
 1. \<chi>' H' = 0
[PROOF STEP]
by (auto simp: \<chi>'_def)
[PROOF STATE]
proof (state)
this:
\<chi>' H' = 0

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
case (3 H1 H2)
[PROOF STATE]
proof (state)
this:
H1 \<in> carrier (G Mod H)
H2 \<in> carrier (G Mod H)

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
from 3
[PROOF STATE]
proof (chain)
picking this:
H1 \<in> carrier (G Mod H)
H2 \<in> carrier (G Mod H)
[PROOF STEP]
have H12: "H1 <#> H2 \<in> carrier (G Mod H)"
[PROOF STATE]
proof (prove)
using this:
H1 \<in> carrier (G Mod H)
H2 \<in> carrier (G Mod H)

goal (1 subgoal):
 1. H1 <#> H2 \<in> carrier (G Mod H)
[PROOF STEP]
using Fact.m_closed
[PROOF STATE]
proof (prove)
using this:
H1 \<in> carrier (G Mod H)
H2 \<in> carrier (G Mod H)
\<lbrakk>?x \<in> carrier (G Mod H); ?y \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> ?x \<otimes>\<^bsub>G Mod H\<^esub> ?y \<in> carrier (G Mod H)

goal (1 subgoal):
 1. H1 <#> H2 \<in> carrier (G Mod H)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
H1 <#> H2 \<in> carrier (G Mod H)

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
have "\<chi> (h (H1 <#> H2)) = \<chi> (h H1 \<otimes> h H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (h (H1 <#> H2)) = \<chi> (h H1 \<otimes> h H2)
[PROOF STEP]
proof (rule \<chi>_cong)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. H #> h (H1 <#> H2) = H #> h H1 \<otimes> h H2
 2. h (H1 <#> H2) \<in> carrier G
 3. h H1 \<otimes> h H2 \<in> carrier G
[PROOF STEP]
show "H #> h (H1 <#> H2) = H #> (h H1 \<otimes> h H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H #> h (H1 <#> H2) = H #> h H1 \<otimes> h H2
[PROOF STEP]
by (metis "3" H.rcos_sum H12 h)
[PROOF STATE]
proof (state)
this:
H #> h (H1 <#> H2) = H #> h H1 \<otimes> h H2

goal (2 subgoals):
 1. h (H1 <#> H2) \<in> carrier G
 2. h H1 \<otimes> h H2 \<in> carrier G
[PROOF STEP]
qed (use 3 h[of H1] h[of H2] h[OF H12] in auto)
[PROOF STATE]
proof (state)
this:
\<chi> (h (H1 <#> H2)) = \<chi> (h H1 \<otimes> h H2)

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> carrier (G Mod H); b \<in> carrier (G Mod H)\<rbrakk> \<Longrightarrow> \<chi>' (a \<otimes>\<^bsub>G Mod H\<^esub> b) = \<chi>' a * \<chi>' b
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<chi> (h (H1 <#> H2)) = \<chi> (h H1 \<otimes> h H2)

goal (1 subgoal):
 1. \<chi>' (H1 \<otimes>\<^bsub>G Mod H\<^esub> H2) = \<chi>' H1 * \<chi>' H2
[PROOF STEP]
using 3 H12 h[of H1] h[of H2]
[PROOF STATE]
proof (prove)
using this:
\<chi> (h (H1 <#> H2)) = \<chi> (h H1 \<otimes> h H2)
H1 \<in> carrier (G Mod H)
H2 \<in> carrier (G Mod H)
H1 <#> H2 \<in> carrier (G Mod H)
H1 \<in> carrier (G Mod H) \<Longrightarrow> h H1 \<in> carrier G
H1 \<in> carrier (G Mod H) \<Longrightarrow> H1 = H #> h H1
H2 \<in> carrier (G Mod H) \<Longrightarrow> h H2 \<in> carrier G
H2 \<in> carrier (G Mod H) \<Longrightarrow> H2 = H #> h H2

goal (1 subgoal):
 1. \<chi>' (H1 \<otimes>\<^bsub>G Mod H\<^esub> H2) = \<chi>' H1 * \<chi>' H2
[PROOF STEP]
by (auto simp: \<chi>'_def)
[PROOF STATE]
proof (state)
this:
\<chi>' (H1 \<otimes>\<^bsub>G Mod H\<^esub> H2) = \<chi>' H1 * \<chi>' H2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
character (G Mod H) \<chi>'

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
character (G Mod H) \<chi>'

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
have "f \<chi>' x = \<chi> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<chi>' x = \<chi> x
[PROOF STEP]
proof (cases "x \<in> carrier G")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
 2. x \<notin> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<notin> carrier G

goal (2 subgoals):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
 2. x \<notin> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<notin> carrier G

goal (1 subgoal):
 1. f \<chi>' x = \<chi> x
[PROOF STEP]
by (auto simp: f_def \<chi>'_def char_eq_0_iff)
[PROOF STATE]
proof (state)
this:
f \<chi>' x = \<chi> x

goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x \<in> carrier G

goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
hence *: "H #> x \<in> carrier (G Mod H)"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G

goal (1 subgoal):
 1. H #> x \<in> carrier (G Mod H)
[PROOF STEP]
by (auto simp: carrier_FactGroup)
[PROOF STATE]
proof (state)
this:
H #> x \<in> carrier (G Mod H)

goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
have "\<chi> (h (H #> x)) = \<chi> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (h (H #> x)) = \<chi> x
[PROOF STEP]
using True * h[of "H #> x"]
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
H #> x \<in> carrier (G Mod H)
H #> x \<in> carrier (G Mod H) \<Longrightarrow> h (H #> x) \<in> carrier G
H #> x \<in> carrier (G Mod H) \<Longrightarrow> H #> x = H #> h (H #> x)

goal (1 subgoal):
 1. \<chi> (h (H #> x)) = \<chi> x
[PROOF STEP]
by (intro \<chi>_cong) auto
[PROOF STATE]
proof (state)
this:
\<chi> (h (H #> x)) = \<chi> x

goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> f \<chi>' x = \<chi> x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<chi> (h (H #> x)) = \<chi> x

goal (1 subgoal):
 1. f \<chi>' x = \<chi> x
[PROOF STEP]
using True *
[PROOF STATE]
proof (prove)
using this:
\<chi> (h (H #> x)) = \<chi> x
x \<in> carrier G
H #> x \<in> carrier (G Mod H)

goal (1 subgoal):
 1. f \<chi>' x = \<chi> x
[PROOF STEP]
by (auto simp: f_def fun_eq_iff \<chi>'_def)
[PROOF STATE]
proof (state)
this:
f \<chi>' x = \<chi> x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f \<chi>' ?x2 = \<chi> ?x2

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
hence "f \<chi>' = \<chi>"
[PROOF STATE]
proof (prove)
using this:
f \<chi>' ?x2 = \<chi> ?x2

goal (1 subgoal):
 1. f \<chi>' = \<chi>
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
f \<chi>' = \<chi>

goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> x \<in> f ` characters (G Mod H)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
character (G Mod H) \<chi>'
f \<chi>' = \<chi>
[PROOF STEP]
show "\<chi> \<in> f ` characters (G Mod H)"
[PROOF STATE]
proof (prove)
using this:
character (G Mod H) \<chi>'
f \<chi>' = \<chi>

goal (1 subgoal):
 1. \<chi> \<in> f ` characters (G Mod H)
[PROOF STEP]
unfolding characters_def
[PROOF STATE]
proof (prove)
using this:
character (G Mod H) \<chi>'
f \<chi>' = \<chi>

goal (1 subgoal):
 1. \<chi> \<in> f ` Collect (character (G Mod H))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<chi> \<in> f ` characters (G Mod H)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
C \<subseteq> f ` characters (G Mod H)

goal (1 subgoal):
 1. f ` characters (G Mod H) = C
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
f ` characters (G Mod H) \<subseteq> C
C \<subseteq> f ` characters (G Mod H)
[PROOF STEP]
show "f ` characters (G Mod H) = C"
[PROOF STATE]
proof (prove)
using this:
f ` characters (G Mod H) \<subseteq> C
C \<subseteq> f ` characters (G Mod H)

goal (1 subgoal):
 1. f ` characters (G Mod H) = C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` characters (G Mod H) = C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
bij_betw f (characters (G Mod H)) C

goal (1 subgoal):
 1. bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))
[PROOF STEP]
thus "bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))"
[PROOF STATE]
proof (prove)
using this:
bij_betw f (characters (G Mod H)) C

goal (1 subgoal):
 1. bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))
[PROOF STEP]
by (simp add: carrier_Characters)
[PROOF STATE]
proof (state)
this:
bij_betw f (carrier (Characters (G Mod H))) (carrier (Characters G\<lparr>carrier := C\<rparr>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f \<in> Group.iso (Characters (G Mod H)) (Characters G\<lparr>carrier := C\<rparr>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measure_eqI_countable':
  assumes spaces: "space M = A" "space N = A"
  assumes sets: "\<And>x. x \<in> A \<Longrightarrow> {x} \<in> sets M" "\<And>x. x \<in> A \<Longrightarrow> {x} \<in> sets N"
  assumes A: "countable A"
  assumes eq: "\<And>a. a \<in> A \<Longrightarrow> emeasure M {a} = emeasure N {a}"
  shows "M = N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = N
[PROOF STEP]
proof (rule measure_eqI_countable)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. sets M = Pow ?A
 2. sets N = Pow ?A
 3. countable ?A
 4. \<And>a. a \<in> ?A \<Longrightarrow> emeasure M {a} = emeasure N {a}
[PROOF STEP]
show "sets M = Pow A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets M = Pow A
[PROOF STEP]
by (intro sets_eq_countable assms)
[PROOF STATE]
proof (state)
this:
sets M = Pow A

goal (3 subgoals):
 1. sets N = Pow A
 2. countable A
 3. \<And>a. a \<in> A \<Longrightarrow> emeasure M {a} = emeasure N {a}
[PROOF STEP]
show "sets N = Pow A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets N = Pow A
[PROOF STEP]
by (intro sets_eq_countable assms)
[PROOF STATE]
proof (state)
this:
sets N = Pow A

goal (2 subgoals):
 1. countable A
 2. \<And>a. a \<in> A \<Longrightarrow> emeasure M {a} = emeasure N {a}
[PROOF STEP]
qed fact+


[STATEMENT]
lemma map_poly_hom_as_monom_sum:
    "(\<Sum>j\<le>degree p. monom (hom (coeff p j)) j) = map_poly hom p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<le>degree p. monom (hom (coeff p j)) j) = map_poly hom p
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>j\<le>degree p. monom (hom (coeff p j)) j) = map_poly hom p
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<le>degree p. monom (hom (coeff p j)) j) = map_poly hom p
[PROOF STEP]
by (subst(6) poly_as_sum_of_monoms'[OF le_refl, symmetric], simp add: hom_distribs)
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>degree p. monom (hom (coeff p j)) j) = map_poly hom p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_multiset_ext\<^sub>D\<^sub>M_iff_mult:
  assumes
    N_A: "set_mset N \<subseteq> A" and M_A: "set_mset M \<subseteq> A" and
    trans: "\<forall>x \<in> A. \<forall>y \<in> A. \<forall>z \<in> A. R x y \<longrightarrow> R y z \<longrightarrow> R x z"
  shows "less_multiset_ext\<^sub>D\<^sub>M R M N \<longleftrightarrow> (M, N) \<in> mult {(x, y). x \<in> A \<and> y \<in> A \<and> R x y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. less_multiset_ext\<^sub>D\<^sub>M R M N = ((M, N) \<in> mult {(x, y). x \<in> A \<and> y \<in> A \<and> R x y})
[PROOF STEP]
using mult_imp_less_multiset_ext\<^sub>D\<^sub>M[OF assms] less_multiset_ext\<^sub>D\<^sub>M_imp_mult[OF N_A M_A]
[PROOF STATE]
proof (prove)
using this:
(M, N) \<in> mult {(x, y). x \<in> A \<and> y \<in> A \<and> R x y} \<Longrightarrow> less_multiset_ext\<^sub>D\<^sub>M R M N
less_multiset_ext\<^sub>D\<^sub>M ?R M N \<Longrightarrow> (M, N) \<in> mult {(x, y). x \<in> A \<and> y \<in> A \<and> ?R x y}

goal (1 subgoal):
 1. less_multiset_ext\<^sub>D\<^sub>M R M N = ((M, N) \<in> mult {(x, y). x \<in> A \<and> y \<in> A \<and> R x y})
[PROOF STEP]
by blast


[STATEMENT]
lemma bin_last_conv_AND:
  "(odd :: int \<Rightarrow> bool) i \<longleftrightarrow> i AND 1 \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd i = (i AND 1 \<noteq> 0)
[PROOF STEP]
by (simp add: and_one_eq mod2_eq_if)


[STATEMENT]
lemma integral_one_over_x_ln_x:
  "a \<le> b \<Longrightarrow> a > 1 \<Longrightarrow> integral {a..b} (\<lambda>x. inverse (x * ln x) :: real) = ln (ln b) - ln (ln a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> b; 1 < a\<rbrakk> \<Longrightarrow> integral {a..b} (\<lambda>x. inverse (x * ln x)) = ln (ln b) - ln (ln a)
[PROOF STEP]
by (intro integral_unique fundamental_theorem_of_calculus_real)
     (auto intro!: derivative_eq_intros simp: field_simps)


[STATEMENT]
lemma tensor_ell2_add2: \<open>tensor_ell2 a (b + c) = tensor_ell2 a b + tensor_ell2 a c\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<otimes>\<^sub>s (b + c) = a \<otimes>\<^sub>s b + a \<otimes>\<^sub>s c
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>has_ell2_norm a; has_ell2_norm b; has_ell2_norm c\<rbrakk> \<Longrightarrow> (\<lambda>(i, j). a i * (b j + c j)) = (\<lambda>x. (case x of (i, j) \<Rightarrow> a i * b j) + (case x of (i, j) \<Rightarrow> a i * c j))
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c x. \<lbrakk>has_ell2_norm a; has_ell2_norm b; has_ell2_norm c\<rbrakk> \<Longrightarrow> (case x of (i, j) \<Rightarrow> a i * (b j + c j)) = (case x of (i, j) \<Rightarrow> a i * b j) + (case x of (i, j) \<Rightarrow> a i * c j)
[PROOF STEP]
apply (auto simp: case_prod_beta)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c aa ba. a aa * (b ba + c ba) = a aa * b ba + a aa * c ba
[PROOF STEP]
by (meson algebra_simps)


[STATEMENT]
lemma non_empty_cycle_root_iff:
  assumes "connected_root r x"
      and "point r"
    shows "x;r \<noteq> 0 \<longleftrightarrow> r \<le> x\<^sup>T\<^sup>+;r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x ; r \<noteq> 0) = (r \<le> x\<^sup>T\<^sup>+ ; r)
[PROOF STEP]
using assms connected_root_iff3 cycle_iff
[PROOF STATE]
proof (prove)
using this:
connected_root r x
point r
point ?r \<Longrightarrow> connected_root ?r ?x = (?x\<^sup>T ; 1 = ?x\<^sup>T\<^sup>+ ; ?r)
point ?r \<Longrightarrow> (?x ; ?r \<noteq> 0) = (?r \<le> ?x\<^sup>T ; 1)

goal (1 subgoal):
 1. (x ; r \<noteq> 0) = (r \<le> x\<^sup>T\<^sup>+ ; r)
[PROOF STEP]
by simp


[STATEMENT]
lemma Kelly_strict_iff: "A \<succ>[Kelly(R)] B \<longleftrightarrow> ((\<forall>a\<in>A. \<forall>b\<in>B. R b a) \<and> \<not> (\<forall>a\<in>B. \<forall>b\<in>A. R b a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<prec>[Kelly R] A = ((\<forall>a\<in>A. \<forall>b\<in>B. R b a) \<and> \<not> (\<forall>a\<in>B. \<forall>b\<in>A. R b a))
[PROOF STEP]
unfolding strongly_preferred_def Kelly_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<forall>a\<in>A. \<forall>b\<in>B. R b a) \<and> \<not> (\<forall>a\<in>B. \<forall>b\<in>A. R b a)) = ((\<forall>a\<in>A. \<forall>b\<in>B. R b a) \<and> \<not> (\<forall>a\<in>B. \<forall>b\<in>A. R b a))
[PROOF STEP]
..