[STATEMENT]
theorem Kneser:
  assumes "A \<subseteq> G" and "B \<subseteq> G" and "finite A" and "finite B" and hAne: "A \<noteq> {}" and hBne: "B \<noteq> {}"
  shows "card (sumset A B) \<ge>  card (sumset A (stabilizer (sumset A B))) +
    card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
have "\<And> n A B. additive_abelian_group G (\<oplus>) \<zero> \<Longrightarrow> A \<subseteq> G \<Longrightarrow> B \<subseteq> G \<Longrightarrow>
    finite A \<Longrightarrow> finite B \<Longrightarrow> A \<noteq> {} \<Longrightarrow> B \<noteq> {}  \<Longrightarrow> card (sumset A B) + card A = n \<Longrightarrow>
    card (sumset A B) \<ge>  card (sumset A (stabilizer (sumset A B))) +
    card (sumset B (stabilizer (sumset A B))) - card ((stabilizer (sumset A B)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n A B. \<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (sumset A B) + card A = n\<rbrakk> \<Longrightarrow> card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B. \<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (sumset A B) + card A = n\<rbrakk> \<Longrightarrow> card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B. \<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (sumset A B) + card A = n\<rbrakk> \<Longrightarrow> card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
show "\<And> A B. additive_abelian_group G (\<oplus>) \<zero> \<Longrightarrow> A \<subseteq> G \<Longrightarrow> B \<subseteq> G \<Longrightarrow>
    finite A \<Longrightarrow> finite B \<Longrightarrow> A \<noteq> {} \<Longrightarrow> B \<noteq> {}  \<Longrightarrow> card (sumset A B) + card A = n \<Longrightarrow>
    card (sumset A B) \<ge>  card (sumset A (stabilizer (sumset A B))) +
    card (sumset B (stabilizer (sumset A B))) - card ((stabilizer (sumset A B)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>A B. \<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (sumset A B) + card A = n\<rbrakk> \<Longrightarrow> card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
proof(induction n arbitrary : G "(\<oplus>)" \<zero> rule: nat_less_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
fix A B G :: "'a set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
fix add (infixl "[\<oplus>]" 65)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
fix zero ("[\<zero>]")
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
assume hind: "\<forall>m<n. \<forall>x xa xb :: 'a set. \<forall> xc xd.
        additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow>
        xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow>
        card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow>
        card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc
        (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa
        (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) -
        card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))
        \<le> card (additive_abelian_group.sumset xb xc x xa)" and
        hGroupG: "additive_abelian_group G ([\<oplus>]) [\<zero>]" and hAG: "A \<subseteq> G" and hBG: "B \<subseteq> G" and
        hA: "finite A" and hB: "finite B" and hAne: "A \<noteq> {}" and hBne: "B \<noteq> {}" and
        hcardsum: "card (additive_abelian_group.sumset G ([\<oplus>]) A B) + card A = n"
[PROOF STATE]
proof (state)
this:
\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa)
additive_abelian_group G ([\<oplus>]) [\<zero>]
A \<subseteq> G
B \<subseteq> G
finite A
finite B
A \<noteq> {}
B \<noteq> {}
card (additive_abelian_group.sumset G ([\<oplus>]) A B) + card A = n

goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
interpret G: additive_abelian_group G "([\<oplus>])" "[\<zero>]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive_abelian_group G ([\<oplus>]) [\<zero>]
[PROOF STEP]
using hGroupG
[PROOF STATE]
proof (prove)
using this:
additive_abelian_group G ([\<oplus>]) [\<zero>]

goal (1 subgoal):
 1. additive_abelian_group G ([\<oplus>]) [\<zero>]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
have hindG: "\<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow>
        D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow>
        card (G.sumset C D) + card C = m \<longrightarrow>
        card (G.sumset C (G.stabilizer
        (G.sumset C D))) + card (G.sumset D
        (G.stabilizer (G.sumset C D))) -
        card (G.stabilizer (G.sumset C D))
        \<le> card (G.sumset C D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D)
[PROOF STEP]
using hind hGroupG
[PROOF STATE]
proof (prove)
using this:
\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa)
additive_abelian_group G ([\<oplus>]) [\<zero>]

goal (1 subgoal):
 1. \<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D)

goal (1 subgoal):
 1. \<And>n A B G addition zero. \<lbrakk>\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa); additive_abelian_group G addition zero; A \<subseteq> G; B \<subseteq> G; finite A; finite B; A \<noteq> {}; B \<noteq> {}; card (additive_abelian_group.sumset G addition A B) + card A = n\<rbrakk> \<Longrightarrow> card (additive_abelian_group.sumset G addition A (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) + card (additive_abelian_group.sumset G addition B (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B))) - card (additive_abelian_group.stabilizer G addition (additive_abelian_group.sumset G addition A B)) \<le> card (additive_abelian_group.sumset G addition A B)
[PROOF STEP]
show "card (G.sumset A (G.stabilizer (G.sumset A B))) +
        card (G.sumset B (G.stabilizer (G.sumset A B))) -
        card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
proof(cases "G.stabilizer (G.sumset A B) = {[\<zero>]}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. G.stabilizer (G.sumset A B) = {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
 2. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
case hstab0: True
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset A B) = {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer (G.sumset A B) = {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
 2. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
proof (cases "card A = 1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. card A = 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
 2. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
card A = 1

goal (2 subgoals):
 1. card A = 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
 2. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card A = 1
[PROOF STEP]
obtain a where "A = {a}" and "a \<in> G"
[PROOF STATE]
proof (prove)
using this:
card A = 1

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>A = {a}; a \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis hAG card_1_singletonE insert_subset)
[PROOF STATE]
proof (state)
this:
A = {a}
a \<in> G

goal (2 subgoals):
 1. card A = 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
 2. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A = {a}
a \<in> G
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A = {a}
a \<in> G

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
using G.card_sumset_singleton_subset_eq
            G.stabilizer_left_sumset_invariant G.stabilizer_subset_group G.sumset_commute
            G.sumset_stabilizer_eq_self hBG
[PROOF STATE]
proof (prove)
using this:
A = {a}
a \<in> G
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> card (G.sumset {?a} ?A) = card ?A
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> G.stabilizer (G.sumset {?a} ?A) = G.stabilizer ?A
G.stabilizer ?S \<subseteq> G
G.sumset ?A ?B = G.sumset ?B ?A
?A \<subseteq> G \<Longrightarrow> G.sumset (G.stabilizer ?A) ?A = ?A
B \<subseteq> G

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
by (metis diff_add_inverse eq_imp_le)
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
card A \<noteq> 1

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card A \<noteq> 1
[PROOF STEP]
have "card A \<ge> 2"
[PROOF STATE]
proof (prove)
using this:
card A \<noteq> 1

goal (1 subgoal):
 1. 2 \<le> card A
[PROOF STEP]
using Suc_1 order_antisym_conv
[PROOF STATE]
proof (prove)
using this:
card A \<noteq> 1
Suc 1 = 2
?y \<le> ?x \<Longrightarrow> (?x \<le> ?y) = (?x = ?y)

goal (1 subgoal):
 1. 2 \<le> card A
[PROOF STEP]
by (metis Suc_eq_plus1 bot.extremum card_seteq hA hAne le_add2 not_less_eq_eq)
[PROOF STATE]
proof (state)
this:
2 \<le> card A

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
2 \<le> card A
[PROOF STEP]
obtain a a' where haA: "{a', a} \<subseteq> A" and hanot: "a' \<noteq> a" and ha1G: "a \<in> G" and
            ha2G: "a' \<in> G"
[PROOF STATE]
proof (prove)
using this:
2 \<le> card A

goal (1 subgoal):
 1. (\<And>a' a. \<lbrakk>{a', a} \<subseteq> A; a' \<noteq> a; a \<in> G; a' \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (smt (verit, ccfv_threshold) card_2_iff hAG insert_subset
                obtain_subset_with_card_n subset_trans)
[PROOF STATE]
proof (state)
this:
{a', a} \<subseteq> A
a' \<noteq> a
a \<in> G
a' \<in> G

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{a', a} \<subseteq> A
a' \<noteq> a
a \<in> G
a' \<in> G
[PROOF STEP]
have "(a' [\<oplus>] (G.inverse a)) \<notin> G.stabilizer B"
[PROOF STATE]
proof (prove)
using this:
{a', a} \<subseteq> A
a' \<noteq> a
a \<in> G
a' \<in> G

goal (1 subgoal):
 1. G.G_minus a' a \<notin> G.stabilizer B
[PROOF STEP]
using G.stabilizer_sub_sumset_right
            hstab0 subset_singletonD
[PROOF STATE]
proof (prove)
using this:
{a', a} \<subseteq> A
a' \<noteq> a
a \<in> G
a' \<in> G
G.stabilizer ?B \<subseteq> G.stabilizer (G.sumset ?A ?B)
G.stabilizer (G.sumset A B) = {[\<zero>]}
?A \<subseteq> {?x} \<Longrightarrow> ?A = {} \<or> ?A = {?x}

goal (1 subgoal):
 1. G.G_minus a' a \<notin> G.stabilizer B
[PROOF STEP]
by (metis G.commutative G.inverse_closed
            G.invertible G.invertible_right_inverse2 G.right_unit empty_iff insert_iff)
[PROOF STATE]
proof (state)
this:
G.G_minus a' a \<notin> G.stabilizer B

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.G_minus a' a \<notin> G.stabilizer B
[PROOF STEP]
obtain b where hb: "b \<in> B" and "(a' [\<oplus>] (G.inverse a)) [\<oplus>] b \<notin> B"
[PROOF STATE]
proof (prove)
using this:
G.G_minus a' a \<notin> G.stabilizer B

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> B; G.G_minus a' a [\<oplus>] b \<notin> B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.stabilizer_def G.not_mem_stabilizer_obtain hBG hB hBne ha1G ha2G
            G.composition_closed G.inverse_closed
[PROOF STATE]
proof (prove)
using this:
G.G_minus a' a \<notin> G.stabilizer B
G.stabilizer ?S \<equiv> {x \<in> G. G.sumset {x} (?S \<inter> G) = ?S \<inter> G}
\<lbrakk>?A \<noteq> {}; ?x \<notin> G.stabilizer ?A; ?x \<in> G; ?A \<subseteq> G; finite ?A; \<And>a. \<lbrakk>a \<in> ?A; ?x [\<oplus>] a \<notin> ?A\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
B \<subseteq> G
finite B
B \<noteq> {}
a \<in> G
a' \<in> G
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> ?a [\<oplus>] ?b \<in> G
?x \<in> G \<Longrightarrow> G.inverse ?x \<in> G

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> B; G.G_minus a' a [\<oplus>] b \<notin> B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis (no_types, lifting))
[PROOF STATE]
proof (state)
this:
b \<in> B
G.G_minus a' a [\<oplus>] b \<notin> B

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b \<in> B
G.G_minus a' a [\<oplus>] b \<notin> B
[PROOF STEP]
have habG: "a' [\<oplus>] b [\<oplus>] G.inverse a \<notin> B"
[PROOF STATE]
proof (prove)
using this:
b \<in> B
G.G_minus a' a [\<oplus>] b \<notin> B

goal (1 subgoal):
 1. G.G_minus (a' [\<oplus>] b) a \<notin> B
[PROOF STEP]
using hb hBG ha1G ha2G
[PROOF STATE]
proof (prove)
using this:
b \<in> B
G.G_minus a' a [\<oplus>] b \<notin> B
b \<in> B
B \<subseteq> G
a \<in> G
a' \<in> G

goal (1 subgoal):
 1. G.G_minus (a' [\<oplus>] b) a \<notin> B
[PROOF STEP]
by (metis G.associative G.commutative G.inverse_closed subset_iff)
[PROOF STATE]
proof (state)
this:
G.G_minus (a' [\<oplus>] b) a \<notin> B

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hbG: "b \<in> G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<in> G
[PROOF STEP]
using hb hBG
[PROOF STATE]
proof (prove)
using this:
b \<in> B
B \<subseteq> G

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

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
let ?B' = "G.sumset (G.differenceset B {b}) {a}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hB': "finite ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hB
[PROOF STATE]
proof (prove)
using this:
finite B

goal (1 subgoal):
 1. finite (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by (simp add: G.finite_minusset G.finite_sumset)
[PROOF STATE]
proof (state)
this:
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hB'G: "?B' \<subseteq> G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<subseteq> G
[PROOF STEP]
using G.sumset_subset_carrier
[PROOF STATE]
proof (prove)
using this:
G.sumset ?A ?B \<subseteq> G

goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<subseteq> G
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.sumset (G.differenceset B {b}) {a} \<subseteq> G

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hB'ne: "?B' \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<noteq> {}
[PROOF STEP]
using hBne hbG ha1G sumset_is_empty_iff hBG
[PROOF STATE]
proof (prove)
using this:
B \<noteq> {}
b \<in> G
a \<in> G
(sumset ?A ?B = {}) = (?A \<inter> G = {} \<or> ?B \<inter> G = {})
B \<subseteq> G

goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (G.differenceset B {b}) {a} \<noteq> {}

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hstabeq: "G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
using hbG ha1G hAG hBG G.stabilizer_unchanged
[PROOF STATE]
proof (prove)
using this:
b \<in> G
a \<in> G
A \<subseteq> G
B \<subseteq> G
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> G.stabilizer (G.sumset ?A ?B) = G.stabilizer (G.sumset ?A (G.sumset (G.differenceset ?B {?b}) {?a}))

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hstab0': "G.stabilizer (G.sumset A ?B') = {[\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}
[PROOF STEP]
using hstab0 hstabeq
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset A B) = {[\<zero>]}
G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have ha1B': "a \<in> ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
have "(b [\<oplus>] G.inverse b) [\<oplus>] a \<in> ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.G_minus b b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
using hBG hbG ha1G hb G.minusset.minussetI
[PROOF STATE]
proof (prove)
using this:
B \<subseteq> G
b \<in> G
a \<in> G
b \<in> B
\<lbrakk>?a \<in> ?A; ?a \<in> G\<rbrakk> \<Longrightarrow> G.inverse ?a \<in> G.minusset ?A

goal (1 subgoal):
 1. G.G_minus b b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.G_minus b b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
thus "a \<in> ?B'"
[PROOF STATE]
proof (prove)
using this:
G.G_minus b b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
by (simp add: hbG ha1G)
[PROOF STATE]
proof (state)
this:
a \<in> G.sumset (G.differenceset B {b}) {a}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a \<in> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
have hinter_nempty: "A \<inter> ?B' \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
a \<in> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> {}
[PROOF STEP]
using ha1B' haA
[PROOF STATE]
proof (prove)
using this:
a \<in> G.sumset (G.differenceset B {b}) {a}
a \<in> G.sumset (G.differenceset B {b}) {a}
{a', a} \<subseteq> A

goal (1 subgoal):
 1. A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> {}

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have ha2B': "a' \<notin> ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a' \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a' \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
have h1: "(a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b \<notin> G.differenceset B {b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<notin> G.differenceset B {b}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b} \<Longrightarrow> False
[PROOF STEP]
assume "(a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b \<in> G.differenceset B {b}"
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}
[PROOF STEP]
obtain b' where "(a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b = b' [\<oplus>] G.inverse b"
                and "b' \<in> B"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}

goal (1 subgoal):
 1. (\<And>b'. \<lbrakk>G.G_minus (G.G_minus (a' [\<oplus>] b) a) b = G.G_minus b' b; b' \<in> B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hbG G.minusset.simps G.sumset.cases
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}
b \<in> G
(?a \<in> G.minusset ?A) = (\<exists>a. ?a = G.inverse a \<and> a \<in> ?A \<and> a \<in> G)
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>b'. \<lbrakk>G.G_minus (G.G_minus (a' [\<oplus>] b) a) b = G.G_minus b' b; b' \<in> B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b = G.G_minus b' b
b' \<in> B

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b = G.G_minus b' b
b' \<in> B
[PROOF STEP]
have "(a' [\<oplus>] b [\<oplus>] G.inverse a) \<in> B"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b = G.G_minus b' b
b' \<in> B

goal (1 subgoal):
 1. G.G_minus (a' [\<oplus>] b) a \<in> B
[PROOF STEP]
using hbG
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b = G.G_minus b' b
b' \<in> B
b \<in> G

goal (1 subgoal):
 1. G.G_minus (a' [\<oplus>] b) a \<in> B
[PROOF STEP]
by (smt (verit) G.composition_closed hBG ha1G ha2G G.inverse_closed G.invertible
                    G.invertible_right_cancel subsetD)
[PROOF STATE]
proof (state)
this:
G.G_minus (a' [\<oplus>] b) a \<in> B

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b} \<Longrightarrow> False
[PROOF STEP]
thus "False"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (a' [\<oplus>] b) a \<in> B

goal (1 subgoal):
 1. False
[PROOF STEP]
using habG
[PROOF STATE]
proof (prove)
using this:
G.G_minus (a' [\<oplus>] b) a \<in> B
G.G_minus (a' [\<oplus>] b) a \<notin> B

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<notin> G.differenceset B {b}

goal (1 subgoal):
 1. a' \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
have "((a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b) [\<oplus>] a \<notin> ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a} \<Longrightarrow> False
[PROOF STEP]
assume "((a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b) [\<oplus>] a \<in> ?B'"
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
obtain b' where "((a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b) [\<oplus>] a = b' [\<oplus>] a"
                and "b' \<in> G.differenceset B {b}"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. (\<And>b'. \<lbrakk>G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a = b' [\<oplus>] a; b' \<in> G.differenceset B {b}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ha1G G.sumset.simps
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a}
a \<in> G
(?a \<in> G.sumset ?A ?B) = (\<exists>a b. ?a = a [\<oplus>] b \<and> a \<in> ?A \<and> a \<in> G \<and> b \<in> ?B \<and> b \<in> G)

goal (1 subgoal):
 1. (\<And>b'. \<lbrakk>G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a = b' [\<oplus>] a; b' \<in> G.differenceset B {b}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a = b' [\<oplus>] a
b' \<in> G.differenceset B {b}

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a = b' [\<oplus>] a
b' \<in> G.differenceset B {b}
[PROOF STEP]
have "((a' [\<oplus>] b [\<oplus>] G.inverse a) [\<oplus>] G.inverse b) \<in> G.differenceset B {b}"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a = b' [\<oplus>] a
b' \<in> G.differenceset B {b}

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}
[PROOF STEP]
using ha1G
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a = b' [\<oplus>] a
b' \<in> G.differenceset B {b}
a \<in> G

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}
[PROOF STEP]
by (smt (z3) G.sumset.simps G.additive_abelian_group_axioms
                    G.composition_closed ha2G hbG G.inverse_closed G.invertible G.invertible_right_cancel)
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}

goal (1 subgoal):
 1. G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<in> G.sumset (G.differenceset B {b}) {a} \<Longrightarrow> False
[PROOF STEP]
thus "False"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}

goal (1 subgoal):
 1. False
[PROOF STEP]
using h1
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<in> G.differenceset B {b}
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b \<notin> G.differenceset B {b}

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<notin> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. a' \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
thus "a' \<notin> ?B'"
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<notin> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. a' \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
using ha1G hbG
[PROOF STATE]
proof (prove)
using this:
G.G_minus (G.G_minus (a' [\<oplus>] b) a) b [\<oplus>] a \<notin> G.sumset (G.differenceset B {b}) {a}
a \<in> G
b \<in> G

goal (1 subgoal):
 1. a' \<notin> G.sumset (G.differenceset B {b}) {a}
[PROOF STEP]
by (smt (verit, del_insts) G.associative G.commutative G.composition_closed ha2G
                  G.inverse_closed G.invertible G.invertible_left_inverse G.right_unit)
[PROOF STATE]
proof (state)
this:
a' \<notin> G.sumset (G.differenceset B {b}) {a}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a' \<notin> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hinterA: "A \<inter> ?B' \<noteq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> A
[PROOF STEP]
using haA ha2B'
[PROOF STATE]
proof (prove)
using this:
{a', a} \<subseteq> A
a' \<notin> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> A

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hintercard0: "0 < card (A \<inter> ?B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < card (A \<inter> G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hA hB hinter_nempty card_gt_0_iff
[PROOF STATE]
proof (prove)
using this:
finite A
finite B
A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> {}
(0 < card ?A) = (?A \<noteq> {} \<and> finite ?A)

goal (1 subgoal):
 1. 0 < card (A \<inter> G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 < card (A \<inter> G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hintercardA: "card (A \<inter> ?B') < card A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset (G.differenceset B {b}) {a}) < card A
[PROOF STEP]
using hA hB hinterA card_mono
[PROOF STATE]
proof (prove)
using this:
finite A
finite B
A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> A
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B

goal (1 subgoal):
 1. card (A \<inter> G.sumset (G.differenceset B {b}) {a}) < card A
[PROOF STEP]
by (simp add: psubsetI psubset_card_mono)
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) < card A

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have inj: "inj_on (\<lambda> x. x [\<oplus>] G.inverse b [\<oplus>] a) G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>x. G.G_minus x b [\<oplus>] a) G
[PROOF STEP]
using inj_onI ha1G hb G.invertible
              G.inverse_closed G.composition_closed
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. \<lbrakk>x \<in> ?A; y \<in> ?A; ?f x = ?f y\<rbrakk> \<Longrightarrow> x = y) \<Longrightarrow> inj_on ?f ?A
a \<in> G
b \<in> B
?u \<in> G \<Longrightarrow> G.invertible ?u
?x \<in> G \<Longrightarrow> G.inverse ?x \<in> G
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> ?a [\<oplus>] ?b \<in> G

goal (1 subgoal):
 1. inj_on (\<lambda>x. G.G_minus x b [\<oplus>] a) G
[PROOF STEP]
by (smt (verit) G.invertible_right_cancel hbG)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. G.G_minus x b [\<oplus>] a) G

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have 1: "card (G.sumset A B) = card (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A B) = card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
using G.card_differenceset_singleton_mem_eq G.card_sumset_singleton_subset_eq hAG hB'G
              ha1G hbG G.sumset_assoc G.sumset_commute G.sumset_subset_carrier
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> card ?A = card (G.differenceset ?A {?a})
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> card (G.sumset {?a} ?A) = card ?A
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
a \<in> G
b \<in> G
G.sumset (G.sumset ?A ?B) ?C = G.sumset ?A (G.sumset ?B ?C)
G.sumset ?A ?B = G.sumset ?B ?A
G.sumset ?A ?B \<subseteq> G

goal (1 subgoal):
 1. card (G.sumset A B) = card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by (smt (verit, del_insts))
[PROOF STATE]
proof (state)
this:
card (G.sumset A B) = card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
obtain C where hCconv: "G.convergent C A ?B'" and hCmin: "\<And> Y. Y \<in> G.convergent_set A ?B'
            \<Longrightarrow> card (G.stabilizer Y) \<ge> card (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>C. \<lbrakk>G.convergent C A (G.sumset (G.differenceset B {b}) {a}); \<And>Y. Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer C) \<le> card (G.stabilizer Y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.exists_convergent_min_stabilizer[of n A ?B']
              hindG hA hB' hAG hB'G hinter_nempty hAne hcardsum hintercardA 1 hGroupG
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D); A \<subseteq> G; G.sumset (G.differenceset B {b}) {a} \<subseteq> G; finite A; finite (G.sumset (G.differenceset B {b}) {a}); A \<noteq> {}; A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> {}; card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) + card A = n; card (A \<inter> G.sumset (G.differenceset B {b}) {a}) < card A; \<And>X. \<lbrakk>G.convergent X A (G.sumset (G.differenceset B {b}) {a}); \<And>Y. Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer X) \<le> card (G.stabilizer Y)\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
\<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
A \<inter> G.sumset (G.differenceset B {b}) {a} \<noteq> {}
A \<noteq> {}
card (G.sumset A B) + card A = n
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) < card A
card (G.sumset A B) = card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
additive_abelian_group G ([\<oplus>]) [\<zero>]

goal (1 subgoal):
 1. (\<And>C. \<lbrakk>G.convergent C A (G.sumset (G.differenceset B {b}) {a}); \<And>Y. Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer C) \<le> card (G.stabilizer Y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.convergent C A (G.sumset (G.differenceset B {b}) {a})
?Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer C) \<le> card (G.stabilizer ?Y)

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hC: "C \<subseteq> G.sumset A ?B'" and hCne: "C \<noteq> {}" and
            hCcard: "card C + card (G.stabilizer C) \<ge>
            card (A \<inter> ?B') + card (G.sumset (A \<union> ?B') (G.stabilizer C))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a}) &&& C \<noteq> {} &&& card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)
[PROOF STEP]
using G.convergent_def hCconv
[PROOF STATE]
proof (prove)
using this:
G.convergent ?C ?A ?B \<equiv> ?C \<subseteq> G.sumset ?A ?B \<and> ?C \<noteq> {} \<and> card (?A \<inter> ?B) + card (G.sumset (?A \<union> ?B) (G.stabilizer ?C)) \<le> card ?C + card (G.stabilizer ?C)
G.convergent C A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a}) &&& C \<noteq> {} &&& card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)
[PROOF STEP]
have hCfinite: "finite C"
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)

goal (1 subgoal):
 1. finite C
[PROOF STEP]
using hC G.finite_sumset hA hB'
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. finite C
[PROOF STEP]
by (meson finite_subset)
[PROOF STATE]
proof (state)
this:
finite C

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have htranslate: "card (G.sumset A {[\<zero>]}) + card (G.sumset ?B' {[\<zero>]}) - card {[\<zero>]} \<le>
            card (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
proof(cases "G.stabilizer C = {[\<zero>]}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
case hCstab0: True
[PROOF STATE]
proof (state)
this:
G.stabilizer C = {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "card (G.sumset A {[\<zero>]}) + card (G.sumset ?B' {[\<zero>]}) - card {[\<zero>]} = card A + card ?B' -
              card {[\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} = card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}
[PROOF STEP]
using hAG hB'G G.card_minusset'
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
?A \<subseteq> G \<Longrightarrow> card (G.minusset ?A) = card ?A

goal (1 subgoal):
 1. card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} = card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} = card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} = card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... = card (A \<inter> ?B') + card (A \<union> ?B') - card {[\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}
[PROOF STEP]
using hA hB' card_Un_Int
[PROOF STATE]
proof (prove)
using this:
finite A
finite (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> card ?A + card ?B = card (?A \<union> ?B) + card (?A \<inter> ?B)

goal (1 subgoal):
 1. card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card A + card (G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... = card (A \<inter> ?B') + card (G.sumset (A \<union> ?B') {[\<zero>]}) - card {[\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]}
[PROOF STEP]
by (simp add: Int_absorb1 Int_commute hAG G.sumset_subset_carrier)
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (A \<union> G.sumset (G.differenceset B {b}) {a}) - card {[\<zero>]} = card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]}

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... \<le> card C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card C
[PROOF STEP]
using hCcard hCstab0
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)
G.stabilizer C = {[\<zero>]}

goal (1 subgoal):
 1. card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card C

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card C

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... \<le> card (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
using hC card_mono G.finite_sumset hA hB'
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (2 subgoals):
 1. G.stabilizer C = {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
 2. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
case hCstab_ne0: False
[PROOF STATE]
proof (state)
this:
G.stabilizer C \<noteq> {[\<zero>]}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hCG: "C \<subseteq> G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<subseteq> G
[PROOF STEP]
using hC
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. C \<subseteq> G
[PROOF STEP]
by (meson subset_trans G.sumset_subset_carrier)
[PROOF STATE]
proof (state)
this:
C \<subseteq> G

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
C \<subseteq> G
[PROOF STEP]
have hstabC: "finite (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G

goal (1 subgoal):
 1. finite (G.stabilizer C)
[PROOF STEP]
using G.stabilizer_finite hCne hC
              G.finite_sumset hA hB'
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G
\<lbrakk>?S \<subseteq> G; ?S \<noteq> {}; finite ?S\<rbrakk> \<Longrightarrow> finite (G.stabilizer ?S)
C \<noteq> {}
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. finite (G.stabilizer C)
[PROOF STEP]
by (metis Nat.add_0_right add_leE card.infinite hCcard
              hintercard0 le_0_eq not_gr0)
[PROOF STATE]
proof (state)
this:
finite (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite (G.stabilizer C)
[PROOF STEP]
have hcardstabC_gt_1: "card (G.stabilizer C) > 1"
[PROOF STATE]
proof (prove)
using this:
finite (G.stabilizer C)

goal (1 subgoal):
 1. 1 < card (G.stabilizer C)
[PROOF STEP]
using G.zero_mem_stabilizer
              hCstab_ne0 hCG
[PROOF STATE]
proof (prove)
using this:
finite (G.stabilizer C)
[\<zero>] \<in> G.stabilizer ?A
G.stabilizer C \<noteq> {[\<zero>]}
C \<subseteq> G

goal (1 subgoal):
 1. 1 < card (G.stabilizer C)
[PROOF STEP]
by (metis card_1_singletonE card_gt_0_iff diffs0_imp_equal empty_iff
              gr_zeroI insertE less_one zero_less_diff)
[PROOF STATE]
proof (state)
this:
1 < card (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "G.sumset (G.stabilizer C) (G.sumset A ?B') \<noteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using G.finite_sumset G.stabilizer_is_nonempty G.stabilizer_subset_group
               G.sumset_eq_sub_stabilizer G.sumset_subset_carrier hA hB' hCstab_ne0 hstab0'
               subset_singletonD
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
G.stabilizer ?S \<noteq> {}
G.stabilizer ?S \<subseteq> G
\<lbrakk>?A \<subseteq> G; ?B \<subseteq> G; finite ?B; G.sumset ?A ?B = ?B\<rbrakk> \<Longrightarrow> ?A \<subseteq> G.stabilizer ?B
G.sumset ?A ?B \<subseteq> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})
G.stabilizer C \<noteq> {[\<zero>]}
G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}
?A \<subseteq> {?x} \<Longrightarrow> ?A = {} \<or> ?A = {?x}

goal (1 subgoal):
 1. G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "card (G.sumset (G.stabilizer C) (G.sumset A ?B')) \<ge> card (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<le> card (G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
using G.card_le_sumset G.finite_sumset hA hB' hstabC
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?A; ?a \<in> ?A; ?a \<in> G; finite ?B; ?B \<subseteq> G\<rbrakk> \<Longrightarrow> card ?B \<le> card (G.sumset ?A ?B)
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
finite (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<le> card (G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
by (meson hCG G.sumset_subset_carrier G.unit_closed G.zero_mem_stabilizer)
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<le> card (G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<le> card (G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
have "\<not> G.sumset (G.stabilizer C) (G.sumset A ?B') \<subseteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
using this:
G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<le> card (G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. \<not> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using G.finite_sumset hA hB' card_seteq
[PROOF STATE]
proof (prove)
using this:
G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<le> card (G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?B; ?A \<subseteq> ?B; card ?B \<le> card ?A\<rbrakk> \<Longrightarrow> ?A = ?B

goal (1 subgoal):
 1. \<not> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<not> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
obtain x where hx1: "x \<in> G.sumset (G.stabilizer C) (G.sumset A ?B')" and
              hx2: "x \<notin> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
using this:
\<not> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a})); x \<notin> G.sumset A (G.sumset (G.differenceset B {b}) {a})\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
x \<notin> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
x \<notin> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
obtain a1 b1 c where "x = c [\<oplus>] (a1 [\<oplus>] b1)" and "c \<in> G.stabilizer C" and
              ha1A: "a1 \<in> A" and hb1B': "b1 \<in> ?B'" and ha1memG: "a1 \<in> G" and hb1memG: "b1 \<in> G"
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
x \<notin> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. (\<And>c a1 b1. \<lbrakk>x = c [\<oplus>] (a1 [\<oplus>] b1); c \<in> G.stabilizer C; a1 \<in> A; b1 \<in> G.sumset (G.differenceset B {b}) {a}; a1 \<in> G; b1 \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis (no_types, lifting) G.sumset.cases)
[PROOF STATE]
proof (state)
this:
x = c [\<oplus>] (a1 [\<oplus>] b1)
c \<in> G.stabilizer C
a1 \<in> A
b1 \<in> G.sumset (G.differenceset B {b}) {a}
a1 \<in> G
b1 \<in> G

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = c [\<oplus>] (a1 [\<oplus>] b1)
c \<in> G.stabilizer C
a1 \<in> A
b1 \<in> G.sumset (G.differenceset B {b}) {a}
a1 \<in> G
b1 \<in> G
[PROOF STEP]
have hx: "x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}"
[PROOF STATE]
proof (prove)
using this:
x = c [\<oplus>] (a1 [\<oplus>] b1)
c \<in> G.stabilizer C
a1 \<in> A
b1 \<in> G.sumset (G.differenceset B {b}) {a}
a1 \<in> G
b1 \<in> G

goal (1 subgoal):
 1. x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}
[PROOF STEP]
using hx1
[PROOF STATE]
proof (prove)
using this:
x = c [\<oplus>] (a1 [\<oplus>] b1)
c \<in> G.stabilizer C
a1 \<in> A
b1 \<in> G.sumset (G.differenceset B {b}) {a}
a1 \<in> G
b1 \<in> G
x \<in> G.sumset (G.stabilizer C) (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}
[PROOF STEP]
by (meson G.composition_closed hAG hB'G insertI1 G.stabilizer_subset_group
              subsetD G.sumset.sumsetI)
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}
[PROOF STEP]
have hnotsubAB: "\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}

goal (1 subgoal):
 1. \<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hx2 G.sumset_commute
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}
x \<notin> G.sumset A (G.sumset (G.differenceset B {b}) {a})
G.sumset ?A ?B = G.sumset ?B ?A

goal (1 subgoal):
 1. \<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?A1 = "A \<inter> (G.sumset {a1} (G.stabilizer C))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?A2 = "A \<inter> (G.sumset {b1} (G.stabilizer C))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?B1 = "?B' \<inter> (G.sumset {b1} (G.stabilizer C))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?B2 = "?B' \<inter> (G.sumset {a1} (G.stabilizer C))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?C1 = "C \<union> (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?C2 = "C \<union> (G.sumset ?A2 ?B2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?H1 = "G.stabilizer (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?H2 = "G.stabilizer (G.sumset ?A2 ?B2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA1ne: "?A1 \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
using ha1A G.zero_mem_stabilizer hCG
[PROOF STATE]
proof (prove)
using this:
a1 \<in> A
[\<zero>] \<in> G.stabilizer ?A
C \<subseteq> G

goal (1 subgoal):
 1. A \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
by (metis (full_types) disjoint_iff_not_equal hAG insertCI G.right_unit subset_eq
                G.sumset.sumsetI G.unit_closed)
[PROOF STATE]
proof (state)
this:
A \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hB1ne: "?B1 \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
using hb1B' G.zero_mem_stabilizer hCG
[PROOF STATE]
proof (prove)
using this:
b1 \<in> G.sumset (G.differenceset B {b}) {a}
[\<zero>] \<in> G.stabilizer ?A
C \<subseteq> G

goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
by (metis G.composition_closed disjoint_iff_not_equal insertCI G.left_unit
                  G.sumset.cases G.sumset.sumsetI G.sumset_commute G.unit_closed)
[PROOF STATE]
proof (state)
this:
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hnotsubC: "\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C
[PROOF STEP]
using hnotsubAB hC
[PROOF STATE]
proof (prove)
using this:
\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. \<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have habstabempty: "G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C = {}
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
assume "G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {}"
[PROOF STATE]
proof (state)
this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {}

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {}
[PROOF STEP]
obtain z where
                hz: "G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}" and
                hzC: "z \<in> C"
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {}

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}; z \<in> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.stabilizer_coset_Un hCG
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {}
?A \<subseteq> G \<Longrightarrow> (\<Union>x\<in>?A. G.sumset {x} (G.stabilizer ?A)) = ?A
C \<subseteq> G

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}; z \<in> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}
z \<in> C

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}
z \<in> C
[PROOF STEP]
have "G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}
z \<in> C

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)
[PROOF STEP]
using hz
                G.sumset_stabilizer_eq_iff hCG G.sumset.simps hx
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}
z \<in> C
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> G.sumset {z} (G.stabilizer C) \<noteq> {}
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> (G.sumset {?a} (G.stabilizer ?A) = G.sumset {?b} (G.stabilizer ?A)) = (G.sumset {?a} (G.stabilizer ?A) \<inter> G.sumset {?b} (G.stabilizer ?A) \<noteq> {})
C \<subseteq> G
(?a \<in> G.sumset ?A ?B) = (\<exists>a b. ?a = a [\<oplus>] b \<and> a \<in> ?A \<and> a \<in> G \<and> b \<in> ?B \<and> b \<in> G)
x \<in> G.sumset (G.stabilizer C) {a1 [\<oplus>] b1}

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)
[PROOF STEP]
have "G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C"
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C
[PROOF STEP]
using hzC
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) = G.sumset {z} (G.stabilizer C)
z \<in> C

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C
[PROOF STEP]
by (simp add: hCG G.stabilizer_coset_subset)
[PROOF STATE]
proof (state)
this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C

goal (1 subgoal):
 1. G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
thus "False"
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C

goal (1 subgoal):
 1. False
[PROOF STEP]
using hnotsubC
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C
\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> C

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C = {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA1B1sub: "G.sumset ?A1 ?B1 \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)" and
              hB2A2sub: "G.sumset ?B2 ?A2 \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) &&& G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
[PROOF STEP]
using G.sumset_Inter_subset_sumset ha1memG hb1memG
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C)) \<subseteq> G.sumset {?a [\<oplus>] ?b} (G.stabilizer ?C)
a1 \<in> G
b1 \<in> G

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) &&& G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
[PROOF STEP]
have hA1B1Cempty: "G.sumset ?A1 ?B1 \<inter> C = {}"
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
[PROOF STEP]
using habstabempty
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C = {}

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
[PROOF STEP]
have hcardC1: "card ?C1 = card C + card (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}

goal (1 subgoal):
 1. card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = card C + card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
using card_Un_disjoint
              G.finite_sumset hA hB' finite_Int hC finite_subset Int_commute
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
\<lbrakk>finite ?A; finite ?B; ?A \<inter> ?B = {}\<rbrakk> \<Longrightarrow> card (?A \<union> ?B) = card ?A + card ?B
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
finite ?F \<or> finite ?G \<Longrightarrow> finite (?F \<inter> ?G)
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
?A \<inter> ?B = ?B \<inter> ?A

goal (1 subgoal):
 1. card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = card C + card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = card C + card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA1B1cardless: "card (G.sumset ?A1 ?B1) < card (G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
have "G.sumset ?A1 ?B1 \<subseteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using G.sumset_mono
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
have "G.sumset ?A1 ?B1 \<noteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hA1B1Cempty hC hCne hA1B1sub
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
show "card (G.sumset ?A1 ?B1) < card (G.sumset A B)"
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
using G.finite_sumset hA hB' psubset_card_mono psubset_eq 1
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?B; ?A \<subset> ?B\<rbrakk> \<Longrightarrow> card ?A < card ?B
(?A \<subset> ?B) = (?A \<subseteq> ?B \<and> ?A \<noteq> ?B)
card (G.sumset A B) = card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hB2A2Cempty: "G.sumset ?B2 ?A2 \<inter> C = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
[PROOF STEP]
using habstabempty hB2A2sub
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<inter> C = {}
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
[PROOF STEP]
have hcardC2: "card ?C2 = card C + card (G.sumset ?B2 ?A2)"
[PROOF STATE]
proof (prove)
using this:
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}

goal (1 subgoal):
 1. card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = card C + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
using card_Un_disjoint
              G.finite_sumset hA hB' finite_Int hC finite_subset Int_commute G.sumset_commute
[PROOF STATE]
proof (prove)
using this:
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
\<lbrakk>finite ?A; finite ?B; ?A \<inter> ?B = {}\<rbrakk> \<Longrightarrow> card (?A \<union> ?B) = card ?A + card ?B
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
finite ?F \<or> finite ?G \<Longrightarrow> finite (?F \<inter> ?G)
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
?A \<inter> ?B = ?B \<inter> ?A
G.sumset ?A ?B = G.sumset ?B ?A

goal (1 subgoal):
 1. card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = card C + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = card C + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA2B2cardless: "card (G.sumset ?A2 ?B2) < card (G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
have "G.sumset ?A2 ?B2 \<subset> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subset> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using G.sumset_mono hB2A2Cempty hC hCne hB2A2sub G.sumset_commute psubset_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C)
G.sumset ?A ?B = G.sumset ?B ?A
(?A \<subset> ?B) = (?A \<subseteq> ?B \<and> ?A \<noteq> ?B)

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subset> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by (metis Int_absorb1 Int_lower1)
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subset> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subset> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subset> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)
[PROOF STEP]
by (simp add: 1 G.finite_sumset hA hB' psubset_card_mono)
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "card ?A1 \<le> card A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card A
[PROOF STEP]
using card_mono hA
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
finite A

goal (1 subgoal):
 1. card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card A
[PROOF STEP]
by (metis Int_lower1)
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card A

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card A
[PROOF STEP]
have "card (G.sumset ?A1 ?B1) + card ?A1 < card (G.sumset A B) + card A"
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card A

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) < card (G.sumset A B) + card A
[PROOF STEP]
using hA1B1cardless
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card A
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) < card (G.sumset A B)

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) < card (G.sumset A B) + card A
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) < card (G.sumset A B) + card A

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) < card (G.sumset A B) + card A
[PROOF STEP]
obtain l where hln: "l < n" and hind1: "card (G.sumset ?A1 ?B1) + card ?A1 = l"
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) < card (G.sumset A B) + card A

goal (1 subgoal):
 1. (\<And>l. \<lbrakk>l < n; card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) = l\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hcardsum
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) < card (G.sumset A B) + card A
card (G.sumset A B) + card A = n

goal (1 subgoal):
 1. (\<And>l. \<lbrakk>l < n; card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) = l\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l < n
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) = l

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "card ?A2 \<le> card A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card A
[PROOF STEP]
using card_mono hA Int_lower1
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
finite A
?A \<inter> ?B \<subseteq> ?A

goal (1 subgoal):
 1. card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card A
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card A

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card A
[PROOF STEP]
have "card (G.sumset ?A2 ?B2) + card ?A2 < card (G.sumset A B) + card A"
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card A

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) < card (G.sumset A B) + card A
[PROOF STEP]
using hA2B2cardless
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card A
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) < card (G.sumset A B)

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) < card (G.sumset A B) + card A
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) < card (G.sumset A B) + card A

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) < card (G.sumset A B) + card A
[PROOF STEP]
obtain k where hkn: "k < n" and hind2: "card (G.sumset ?A2 ?B2) + card ?A2 = k"
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) < card (G.sumset A B) + card A

goal (1 subgoal):
 1. (\<And>k. \<lbrakk>k < n; card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) = k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hcardsum
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) < card (G.sumset A B) + card A
card (G.sumset A B) + card A = n

goal (1 subgoal):
 1. (\<And>k. \<lbrakk>k < n; card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) = k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k < n
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) = k

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hH1stabC: "?H1 \<subset> G.stabilizer C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
[PROOF STEP]
using G.stabilizer_sumset_psubset_stabilizer
                hA1ne hB1ne ha1memG hb1memG hnotsubAB
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G; ?b \<in> G; ?A \<inter> G.sumset {?a} (G.stabilizer ?C) \<noteq> {}; ?B \<inter> G.sumset {?b} (G.stabilizer ?C) \<noteq> {}; \<not> G.sumset {?a [\<oplus>] ?b} (G.stabilizer ?C) \<subseteq> G.sumset ?A ?B\<rbrakk> \<Longrightarrow> G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C))) \<subset> G.stabilizer ?C
A \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
a1 \<in> G
b1 \<in> G
\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
[PROOF STEP]
have "card ?H1 < card (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C

goal (1 subgoal):
 1. card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)
[PROOF STEP]
using psubset_card_mono hstabC
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
\<lbrakk>finite ?B; ?A \<subset> ?B\<rbrakk> \<Longrightarrow> card ?A < card ?B
finite (G.stabilizer C)

goal (1 subgoal):
 1. card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hC1H1: "?H1 = G.stabilizer ?C1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
using G.stabilizer_eq_stabilizer_union
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G; ?b \<in> G; ?A \<inter> G.sumset {?a} (G.stabilizer ?C) \<noteq> {}; ?B \<inter> G.sumset {?b} (G.stabilizer ?C) \<noteq> {}; \<not> G.sumset {?a [\<oplus>] ?b} (G.stabilizer ?C) \<subseteq> G.sumset ?A ?B; ?C \<subseteq> G.sumset ?A ?B; finite ?C; ?C \<inter> G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C)) = {}; ?C \<noteq> {}; finite ?A; finite ?B\<rbrakk> \<Longrightarrow> G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C))) = G.stabilizer (?C \<union> G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C)))

goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
by (metis Int_commute hA hA1B1Cempty hA1ne hB' hB1ne hC hCfinite hCne ha1memG hb1memG hnotsubAB)
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
have hC1notconv: "\<not> G.convergent ?C1 A ?B'"
[PROOF STATE]
proof (prove)
using this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. \<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hCmin G.convergent_set_def
              le_antisym less_imp_le_nat less_not_refl2
[PROOF STATE]
proof (prove)
using this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) < card (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
?Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer C) \<le> card (G.stabilizer ?Y)
G.convergent_set ?A ?B = {C. G.convergent C ?A ?B}
\<lbrakk>?m \<le> ?n; ?n \<le> ?m\<rbrakk> \<Longrightarrow> ?m = ?n
?m < ?n \<Longrightarrow> ?m \<le> ?n
?n < ?m \<Longrightarrow> ?m \<noteq> ?n

goal (1 subgoal):
 1. \<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hC1ne: "?C1 \<noteq> {}" and hC2ne: "?C2 \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> {} &&& C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<noteq> {}
[PROOF STEP]
using hCne
[PROOF STATE]
proof (prove)
using this:
C \<noteq> {}

goal (1 subgoal):
 1. C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> {} &&& C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> {}
C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hC1AB': "?C1 \<subseteq> G.sumset A ?B'" and hC2AB': "?C2 \<subseteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a}) &&& C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hC
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a}) &&& C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by (auto simp add: G.sumset_mono)
[PROOF STATE]
proof (state)
this:
C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA1G: "?A1 \<subseteq> G" and hA1 : "finite ?A1" and hB1G: "?B1 \<subseteq> G" and hB1: "finite ?B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G &&& finite (A \<inter> G.sumset {a1} (G.stabilizer C))) &&& G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G &&& finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
[PROOF STEP]
using hAG hB'G hA hB' finite_Int
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})
finite ?F \<or> finite ?G \<Longrightarrow> finite (?F \<inter> ?G)

goal (1 subgoal):
 1. (A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G &&& finite (A \<inter> G.sumset {a1} (G.stabilizer C))) &&& G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G &&& finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
[PROOF STEP]
have hindA1B1: "card (G.sumset ?A1 ?H1) + card (G.sumset ?B1 ?H1) - card ?H1 \<le>
              card (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (prove)
using this:
A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
using hindG hGroupG hA1ne hB1ne hind1 hln hAG hB'G
              hA hB'
[PROOF STATE]
proof (prove)
using this:
A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
\<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D)
additive_abelian_group G ([\<oplus>]) [\<zero>]
A \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) = l
l < n
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hC1notconv_ineq:
              "(int (card ?C1) + card ?H1 - card (A \<inter> ?B')) < int (card (G.sumset (A \<union> ?B') ?H1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using hC1notconv hC1ne hC1AB' hC1H1 G.convergent_def
[PROOF STATE]
proof (prove)
using this:
\<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})
C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<noteq> {}
C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
G.convergent ?C ?A ?B \<equiv> ?C \<subseteq> G.sumset ?A ?B \<and> ?C \<noteq> {} \<and> card (?A \<inter> ?B) + card (G.sumset (?A \<union> ?B) (G.stabilizer ?C)) \<le> card ?C + card (G.stabilizer ?C)

goal (1 subgoal):
 1. int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) - card (G.sumset (A \<union> ?B') ?H1)
            \<le> (int (card C) + card (G.stabilizer C) - card (A \<inter> ?B')) - card (G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using hCcard
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) - card (G.sumset (A \<union> ?B') ?H1) <
              (int (card C) + card (G.stabilizer C) - card (A \<inter> ?B')) -
              (int (card ?C1) + card ?H1 - card (A \<inter> ?B'))"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
using hC1notconv_ineq
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... = int (card (G.stabilizer C)) - card ?H1 - card (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
using hcardC1
[PROOF STATE]
proof (prove)
using this:
card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = card C + card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... \<le> int (card (G.stabilizer C)) - card (G.sumset ?A1 ?H1) - card (G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using hindA1B1
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open> Finally, we deduce the inequality that is referred to as
     inequality (1) in \cite{DeVos_Kneser} for @{term ?A1} and  @{term ?B1}. \<close>
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have hA1B1ineq: "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) -
              card (G.sumset (A \<union> ?B') ?H1) < int (card (G.stabilizer C)) -
              card (G.sumset ?A1 ?H1) - card (G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hB2ne: "?B2 \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
using G.sumset_inter_ineq hA1B1ineq ha1A ha1G hA hB' hAne hB'ne
              hstabC hH1stabC ha1memG of_nat_0_le_iff
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?B \<inter> G.sumset {?a} (G.stabilizer ?C) = {}; G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C))) \<subset> G.stabilizer ?C; ?a \<in> ?A; ?a \<in> G; finite ?A; finite ?B; ?A \<noteq> {}; ?B \<noteq> {}; finite (G.stabilizer ?C)\<rbrakk> \<Longrightarrow> int (card (G.stabilizer ?C)) - int (card (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C)))))) \<le> int (card (G.sumset (?A \<union> ?B) (G.stabilizer ?C))) - int (card (G.sumset (?A \<union> ?B) (G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C))))))
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
a1 \<in> A
a \<in> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})
A \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<noteq> {}
finite (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
a1 \<in> G
(0::?'a) \<le> of_nat ?n

goal (1 subgoal):
 1. G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
by (smt (verit, del_insts))
[PROOF STATE]
proof (state)
this:
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA2ne: "?A2 \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
using G.sumset_inter_ineq[of "A" "b1" "C" "?B'" "a1"] hA1B1ineq
              hb1B' hb1memG hA hB' hAne hB'ne  hstabC hH1stabC of_nat_0_le_iff G.sumset_commute Un_commute
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>A \<inter> G.sumset {b1} (G.stabilizer C) = {}; G.stabilizer (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (A \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C; b1 \<in> G.sumset (G.differenceset B {b}) {a}; b1 \<in> G; finite (G.sumset (G.differenceset B {b}) {a}); finite A; G.sumset (G.differenceset B {b}) {a} \<noteq> {}; A \<noteq> {}; finite (G.stabilizer C)\<rbrakk> \<Longrightarrow> int (card (G.stabilizer C)) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (A \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<union> A) (G.stabilizer C))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<union> A) (G.stabilizer (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (A \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
b1 \<in> G.sumset (G.differenceset B {b}) {a}
b1 \<in> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})
A \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<noteq> {}
finite (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
(0::?'a) \<le> of_nat ?n
G.sumset ?A ?B = G.sumset ?B ?A
?A \<union> ?B = ?B \<union> ?A

goal (1 subgoal):
 1. A \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
[PROOF STEP]
by (smt (verit, ccfv_SIG))
[PROOF STATE]
proof (state)
this:
A \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hH2stabC: "?H2 \<subset> G.stabilizer C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
[PROOF STEP]
using G.stabilizer_sumset_psubset_stabilizer
              G.commutative hA2ne hB2ne ha1memG hb1memG hnotsubAB
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G; ?b \<in> G; ?A \<inter> G.sumset {?a} (G.stabilizer ?C) \<noteq> {}; ?B \<inter> G.sumset {?b} (G.stabilizer ?C) \<noteq> {}; \<not> G.sumset {?a [\<oplus>] ?b} (G.stabilizer ?C) \<subseteq> G.sumset ?A ?B\<rbrakk> \<Longrightarrow> G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C))) \<subset> G.stabilizer ?C
\<lbrakk>?x \<in> G; ?y \<in> G\<rbrakk> \<Longrightarrow> ?x [\<oplus>] ?y = ?y [\<oplus>] ?x
A \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
a1 \<in> G
b1 \<in> G
\<not> G.sumset {a1 [\<oplus>] b1} (G.stabilizer C) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
[PROOF STEP]
have "card ?H2 < card (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C

goal (1 subgoal):
 1. card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)
[PROOF STEP]
using psubset_card_mono hstabC
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
\<lbrakk>finite ?B; ?A \<subset> ?B\<rbrakk> \<Longrightarrow> card ?A < card ?B
finite (G.stabilizer C)

goal (1 subgoal):
 1. card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hC2H2: "?H2 = G.stabilizer ?C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
[PROOF STEP]
using G.stabilizer_eq_stabilizer_union
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G; ?b \<in> G; ?A \<inter> G.sumset {?a} (G.stabilizer ?C) \<noteq> {}; ?B \<inter> G.sumset {?b} (G.stabilizer ?C) \<noteq> {}; \<not> G.sumset {?a [\<oplus>] ?b} (G.stabilizer ?C) \<subseteq> G.sumset ?A ?B; ?C \<subseteq> G.sumset ?A ?B; finite ?C; ?C \<inter> G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C)) = {}; ?C \<noteq> {}; finite ?A; finite ?B\<rbrakk> \<Longrightarrow> G.stabilizer (G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C))) = G.stabilizer (?C \<union> G.sumset (?A \<inter> G.sumset {?a} (G.stabilizer ?C)) (?B \<inter> G.sumset {?b} (G.stabilizer ?C)))

goal (1 subgoal):
 1. G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
[PROOF STEP]
by (smt (verit, ccfv_threshold) G.sumset_commute Int_commute hA hA2ne hB' hB2A2Cempty
                hB2ne hC hCfinite hCne ha1memG hb1memG hnotsubAB)
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
[PROOF STEP]
have hC2notconv: "\<not> G.convergent ?C2 A ?B'"
[PROOF STATE]
proof (prove)
using this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))

goal (1 subgoal):
 1. \<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hCmin G.convergent_set_def le_antisym less_imp_le_nat less_not_refl2
[PROOF STATE]
proof (prove)
using this:
card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) < card (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
?Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer C) \<le> card (G.stabilizer ?Y)
G.convergent_set ?A ?B = {C. G.convergent C ?A ?B}
\<lbrakk>?m \<le> ?n; ?n \<le> ?m\<rbrakk> \<Longrightarrow> ?m = ?n
?m < ?n \<Longrightarrow> ?m \<le> ?n
?n < ?m \<Longrightarrow> ?m \<noteq> ?n

goal (1 subgoal):
 1. \<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA2G: "?A2 \<subseteq> G" and hA2 : "finite ?A2" and hB2G: "?B2 \<subseteq> G" and hB2: "finite ?B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G &&& finite (A \<inter> G.sumset {b1} (G.stabilizer C))) &&& G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G &&& finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
[PROOF STEP]
using hAG hB'G hA hB' finite_Int
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})
finite ?F \<or> finite ?G \<Longrightarrow> finite (?F \<inter> ?G)

goal (1 subgoal):
 1. (A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G &&& finite (A \<inter> G.sumset {b1} (G.stabilizer C))) &&& G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G &&& finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {b1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {b1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
[PROOF STEP]
have hindA2B2: "card (G.sumset ?A2 ?H2) + card (G.sumset ?B2 ?H2) - card ?H2 \<le>
              card (G.sumset ?A2 ?B2)"
[PROOF STATE]
proof (prove)
using this:
A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {b1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
[PROOF STEP]
using hindG hGroupG hA2ne hB2ne hind2 hkn hAG hB'G hA hB'
[PROOF STATE]
proof (prove)
using this:
A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {b1} (G.stabilizer C))
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
\<forall>m<n. \<forall>C D. C \<subseteq> G \<longrightarrow> D \<subseteq> G \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (G.sumset C D) + card C = m \<longrightarrow> card (G.sumset C (G.stabilizer (G.sumset C D))) + card (G.sumset D (G.stabilizer (G.sumset C D))) - card (G.stabilizer (G.sumset C D)) \<le> card (G.sumset C D)
additive_abelian_group G ([\<oplus>]) [\<zero>]
A \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) = k
k < n
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hC2notconv_ineq:
              "(int (card ?C2) + card ?H2 - card (A \<inter> ?B')) < int (card (G.sumset (A \<union> ?B') ?H2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using hC2notconv hC2ne hC2AB' hC2H2 G.convergent_def
[PROOF STATE]
proof (prove)
using this:
\<not> G.convergent (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) A (G.sumset (G.differenceset B {b}) {a})
C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<noteq> {}
C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = G.stabilizer (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
G.convergent ?C ?A ?B \<equiv> ?C \<subseteq> G.sumset ?A ?B \<and> ?C \<noteq> {} \<and> card (?A \<inter> ?B) + card (G.sumset (?A \<union> ?B) (G.stabilizer ?C)) \<le> card ?C + card (G.stabilizer ?C)

goal (1 subgoal):
 1. int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) - card (G.sumset (A \<union> ?B') ?H2)
              \<le> (int (card C) + card (G.stabilizer C) - card (A \<inter> ?B')) - card (G.sumset (A \<union> ?B') ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using hCcard
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) - card (G.sumset (A \<union> ?B') ?H2) <
              (int (card C) + card (G.stabilizer C) - card (A \<inter> ?B')) -
              (int (card ?C2) + card ?H2 - card (A \<inter> ?B'))"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
using hC2notconv_ineq
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) \<le> int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... = int (card (G.stabilizer C)) - card ?H2 - card (G.sumset ?A2 ?B2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
using hcardC2 G.sumset_commute
[PROOF STATE]
proof (prove)
using this:
card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) = card C + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)))
G.sumset ?A ?B = G.sumset ?B ?A

goal (1 subgoal):
 1. int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card C) + int (card (G.stabilizer C)) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - (int (card (C \<union> G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (A \<inter> G.sumset (G.differenceset B {b}) {a}))) = int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... \<le> int (card (G.stabilizer C)) - card (G.sumset ?A2 ?H2) - card (G.sumset ?B2 ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using hindA2B2
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))

goal (1 subgoal):
 1. int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open> Analogously, we deduce the inequality that is referred to as
     inequality (1) in \cite{DeVos_Kneser} for @{term ?A2} and  @{term ?B2}. \<close>
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer C)) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
have hA2B2ineq: "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) -
              card (G.sumset (A \<union> ?B') ?H2) < int (card (G.stabilizer C)) -
              card (G.sumset ?A2 ?H2) - card (G.sumset ?B2 ?H2)"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hfinsumH2:"finite (G.sumset (A \<union> ?B') ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
using G.finite_sumset hA hB' finite_UnI hstabC hH2stabC finite_subset psubset_imp_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?F; finite ?G\<rbrakk> \<Longrightarrow> finite (?F \<union> ?G)
finite (G.stabilizer C)
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B

goal (1 subgoal):
 1. finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hsubsumH2: "G.sumset (A \<union> ?B') ?H2 \<subseteq> G.sumset (A \<union> ?B') (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
using G.sumset.cases hAG hB'G G.stabilizer_subset_group hH2stabC psubset_imp_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
G.stabilizer ?S \<subseteq> G
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B

goal (1 subgoal):
 1. G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
by (smt (verit, best) subset_Un_eq G.sumset_commute G.sumset_subset_Un1)
[PROOF STATE]
proof (state)
this:
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
have hsumH2card_le: "card (G.sumset (A \<union> ?B') ?H2) \<le>
              card (G.sumset (A \<union> ?B') (G.stabilizer C))"
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
using card_mono G.finite_sumset G.stabilizer_finite hC hCne hCG hA hB'
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
\<lbrakk>?S \<subseteq> G; ?S \<noteq> {}; finite ?S\<rbrakk> \<Longrightarrow> finite (G.stabilizer ?S)
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
C \<noteq> {}
C \<subseteq> G
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
by (metis finite_UnI hstabC)
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hfinsumH1: "finite (G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using finite_sumset finite_Un psubsetE
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (sumset ?A ?B)
finite (?F \<union> ?G) = (finite ?F \<and> finite ?G)
\<lbrakk>?A \<subset> ?B; \<lbrakk>?A \<subseteq> ?B; \<not> ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> ?R\<rbrakk> \<Longrightarrow> ?R

goal (1 subgoal):
 1. finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by (metis G.finite_sumset G.stabilizer_finite
                G.sumset_subset_carrier Int_Un_eq(4) hA hA1 hB' hB1 hC1H1 hH1stabC habstabempty)
[PROOF STATE]
proof (state)
this:
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hsubsumH1: "G.sumset (A \<union> ?B') ?H1 \<subseteq> G.sumset (A \<union> ?B') (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
using G.sumset.cases psubsetE subset_refl G.sumset_mono hH1stabC
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
\<lbrakk>?A \<subset> ?B; \<lbrakk>?A \<subseteq> ?B; \<not> ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> ?R\<rbrakk> \<Longrightarrow> ?R
?A \<subseteq> ?A
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C

goal (1 subgoal):
 1. G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hsumH1card_le: "card (G.sumset (A \<union> ?B') ?H1) \<le> card (G.sumset (A \<union> ?B') (G.stabilizer C))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
using card_mono G.finite_sumset G.stabilizer_finite
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
\<lbrakk>?S \<subseteq> G; ?S \<noteq> {}; finite ?S\<rbrakk> \<Longrightarrow> finite (G.stabilizer ?S)

goal (1 subgoal):
 1. card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
by (metis finite_UnI hA hB' hstabC hsubsumH1)
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have ha1b1stabCne: "G.sumset {a1} (G.stabilizer C) \<noteq> G.sumset {b1} (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) \<noteq> G.sumset {b1} (G.stabilizer C)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
assume ha1b1: "G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C)"
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
have hfin: "finite (G.sumset ?A1 ?H1 \<union> G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using finite_UnI G.finite_sumset hA1 hB1 hH1stabC hstabC psubset_imp_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?F; finite ?G\<rbrakk> \<Longrightarrow> finite (?F \<union> ?G)
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
finite (G.stabilizer C)
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B

goal (1 subgoal):
 1. finite (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by (metis finite_subset)
[PROOF STATE]
proof (state)
this:
finite (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
have "int (card (G.sumset {a1} (G.stabilizer C))) - card (G.sumset ?A1 ?H1) -
                card (G.sumset ?B1 ?H1) \<le> int (card (G.sumset {a1} (G.stabilizer C))) -
                card (G.sumset ?A1 ?H1 \<union> G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using card_Un_le[of "G.sumset ?A1 ?H1" "G.sumset ?B1 ?H1"]
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
have "... \<le> card (G.sumset {a1} (G.stabilizer C) - (G.sumset ?A1 ?H1 \<union> G.sumset ?B1 ?H1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))))
[PROOF STEP]
using diff_card_le_card_Diff[of "G.sumset ?A1 ?H1 \<union> G.sumset ?B1 ?H1"
                  "G.sumset {a1} (G.stabilizer C)"] hfin
[PROOF STATE]
proof (prove)
using this:
finite (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<Longrightarrow> card (G.sumset {a1} (G.stabilizer C)) - card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
finite (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
have "... \<le> card (G.sumset {a1} (G.stabilizer C) - G.sumset (?A1 \<union> ?B1) ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using G.sumset_subset_Un1
[PROOF STATE]
proof (prove)
using this:
G.sumset (?A \<union> ?A') ?B = G.sumset ?A ?B \<union> G.sumset ?A' ?B

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<union> G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))) \<le> int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
have "... \<le> card (G.sumset (A \<union> ?B') (G.stabilizer C) - G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have hsub: "G.sumset {a1} (G.stabilizer C) - G.sumset (?A1 \<union> ?B1) ?H1 \<subseteq>
                  G.sumset (A \<union> ?B') (G.stabilizer C) - G.sumset (A \<union> ?B') ?H1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
assume hx: "x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (?A1 \<union> ?B1) ?H1"
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
obtain c where hxac: "x = a1 [\<oplus>] c" and hc: "c \<in> G.stabilizer C"
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>x = a1 [\<oplus>] c; c \<in> G.stabilizer C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.sumset.cases
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>x = a1 [\<oplus>] c; c \<in> G.stabilizer C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x = a1 [\<oplus>] c
c \<in> G.stabilizer C

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = a1 [\<oplus>] c
c \<in> G.stabilizer C
[PROOF STEP]
have "x \<in> G.sumset (A \<union> ?B') (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
x = a1 [\<oplus>] c
c \<in> G.stabilizer C

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
using ha1A hAG
                    G.stabilizer_subset_group
[PROOF STATE]
proof (prove)
using this:
x = a1 [\<oplus>] c
c \<in> G.stabilizer C
a1 \<in> A
A \<subseteq> G
G.stabilizer ?S \<subseteq> G

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
by (simp add: subset_iff G.sumset.sumsetI)
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
have "x \<notin> G.sumset (A \<union> ?B') ?H1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
assume hx1: "x \<in> G.sumset (A \<union> ?B') ?H1"
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
obtain y h1 where hxy: "x = y [\<oplus>] h1" and hy: "y \<in> A \<union> ?B'" and
                      hh1: "h1 \<in> ?H1"
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. (\<And>y h1. \<lbrakk>x = y [\<oplus>] h1; y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}; h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.sumset.cases
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>y h1. \<lbrakk>x = y [\<oplus>] h1; y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}; h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x = y [\<oplus>] h1
y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}
h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = y [\<oplus>] h1
y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}
h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
have hyG: "y \<in> G" and hcG: "c \<in> G" and hh1G: "h1 \<in> G"
[PROOF STATE]
proof (prove)
using this:
x = y [\<oplus>] h1
y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}
h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. y \<in> G &&& c \<in> G &&& h1 \<in> G
[PROOF STEP]
using hAG hB'G G.stabilizer_subset_group hc
[PROOF STATE]
proof (prove)
using this:
x = y [\<oplus>] h1
y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}
h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
G.stabilizer ?S \<subseteq> G
c \<in> G.stabilizer C

goal (1 subgoal):
 1. y \<in> G &&& c \<in> G &&& h1 \<in> G
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y \<in> G
c \<in> G
h1 \<in> G

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> G
c \<in> G
h1 \<in> G
[PROOF STEP]
have "y = a1 [\<oplus>] (c [\<oplus>] G.inverse h1)"
[PROOF STATE]
proof (prove)
using this:
y \<in> G
c \<in> G
h1 \<in> G

goal (1 subgoal):
 1. y = a1 [\<oplus>] G.G_minus c h1
[PROOF STEP]
using hxac hxy ha1A hAG
[PROOF STATE]
proof (prove)
using this:
y \<in> G
c \<in> G
h1 \<in> G
x = a1 [\<oplus>] c
x = y [\<oplus>] h1
a1 \<in> A
A \<subseteq> G

goal (1 subgoal):
 1. y = a1 [\<oplus>] G.G_minus c h1
[PROOF STEP]
by (metis G.associative G.commutative G.composition_closed in_mono
                        G.inverse_closed G.invertible G.invertible_left_inverse2)
[PROOF STATE]
proof (state)
this:
y = a1 [\<oplus>] G.G_minus c h1

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
y = a1 [\<oplus>] G.G_minus c h1

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
have "h1 \<in> G.stabilizer C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h1 \<in> G.stabilizer C
[PROOF STEP]
using hh1 hH1stabC
[PROOF STATE]
proof (prove)
using this:
h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C

goal (1 subgoal):
 1. h1 \<in> G.stabilizer C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
h1 \<in> G.stabilizer C

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
h1 \<in> G.stabilizer C

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
hence "c [\<oplus>] G.inverse h1 \<in> G.stabilizer C"
[PROOF STATE]
proof (prove)
using this:
h1 \<in> G.stabilizer C

goal (1 subgoal):
 1. G.G_minus c h1 \<in> G.stabilizer C
[PROOF STEP]
using hc
                        G.stabilizer_is_subgroup subgroup_def G.group_axioms
                        group.invertible subgroup.subgroup_inverse_iff
                        submonoid.sub_composition_closed hh1G
[PROOF STATE]
proof (prove)
using this:
h1 \<in> G.stabilizer C
c \<in> G.stabilizer C
subgroup (G.stabilizer ?S) G ([\<oplus>]) [\<zero>]
subgroup ?G ?M ?composition ?unit \<equiv> submonoid ?G ?M ?composition ?unit \<and> Group_Theory.group ?G ?composition ?unit
Group_Theory.group G ([\<oplus>]) [\<zero>]
\<lbrakk>Group_Theory.group ?G ?composition ?unit; ?u \<in> ?G\<rbrakk> \<Longrightarrow> monoid.invertible ?G ?composition ?unit ?u
\<lbrakk>subgroup ?G ?M ?composition ?unit; monoid.invertible ?M ?composition ?unit ?x; ?x \<in> ?M\<rbrakk> \<Longrightarrow> (monoid.inverse ?M ?composition ?unit ?x \<in> ?G) = (?x \<in> ?G)
\<lbrakk>submonoid ?N ?M ?composition ?unit; ?a \<in> ?N; ?b \<in> ?N\<rbrakk> \<Longrightarrow> ?composition ?a ?b \<in> ?N
h1 \<in> G

goal (1 subgoal):
 1. G.G_minus c h1 \<in> G.stabilizer C
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
G.G_minus c h1 \<in> G.stabilizer C

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
y = a1 [\<oplus>] G.G_minus c h1
h1 \<in> G.stabilizer C
G.G_minus c h1 \<in> G.stabilizer C
[PROOF STEP]
have "y \<in> G.sumset {a1} (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
y = a1 [\<oplus>] G.G_minus c h1
h1 \<in> G.stabilizer C
G.G_minus c h1 \<in> G.stabilizer C

goal (1 subgoal):
 1. y \<in> G.sumset {a1} (G.stabilizer C)
[PROOF STEP]
using ha1G hcG hAG ha1A hh1G
[PROOF STATE]
proof (prove)
using this:
y = a1 [\<oplus>] G.G_minus c h1
h1 \<in> G.stabilizer C
G.G_minus c h1 \<in> G.stabilizer C
a \<in> G
c \<in> G
A \<subseteq> G
a1 \<in> A
h1 \<in> G

goal (1 subgoal):
 1. y \<in> G.sumset {a1} (G.stabilizer C)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> G.sumset {a1} (G.stabilizer C)

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> G.sumset {a1} (G.stabilizer C)
[PROOF STEP]
have "y \<in> ?A1 \<union> ?B1"
[PROOF STATE]
proof (prove)
using this:
y \<in> G.sumset {a1} (G.stabilizer C)

goal (1 subgoal):
 1. y \<in> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
[PROOF STEP]
using hy
[PROOF STATE]
proof (prove)
using this:
y \<in> G.sumset {a1} (G.stabilizer C)
y \<in> A \<union> G.sumset (G.differenceset B {b}) {a}

goal (1 subgoal):
 1. y \<in> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
[PROOF STEP]
by (simp add: ha1b1)
[PROOF STATE]
proof (state)
this:
y \<in> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> False
[PROOF STEP]
thus "False"
[PROOF STATE]
proof (prove)
using this:
y \<in> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)

goal (1 subgoal):
 1. False
[PROOF STEP]
using hx hxy hh1 hh1G hyG
[PROOF STATE]
proof (prove)
using this:
y \<in> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
x = y [\<oplus>] h1
h1 \<in> G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
h1 \<in> G
y \<in> G

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x \<notin> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<Longrightarrow> x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
x \<notin> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
show "x \<in> G.sumset (A \<union> ?B') (G.stabilizer C) - G.sumset (A \<union> ?B') ?H1"
[PROOF STATE]
proof (prove)
using this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
x \<notin> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<in> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have "finite (G.sumset {a1} (G.stabilizer C) - G.sumset (?A1 \<union> ?B1) ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using finite_subset G.finite_sumset hstabC
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite (G.stabilizer C)

goal (1 subgoal):
 1. finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
hence "finite (G.sumset (A \<union> ?B') (G.stabilizer C) - G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
using this:
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using finite_subset G.finite_sumset hstabC hA hB' finite_UnI
[PROOF STATE]
proof (prove)
using this:
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite (G.stabilizer C)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?F; finite ?G\<rbrakk> \<Longrightarrow> finite (?F \<union> ?G)

goal (1 subgoal):
 1. finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have "card (G.sumset {a1} (G.stabilizer C) - G.sumset (?A1 \<union> ?B1) ?H1) \<le>
                  card (G.sumset (A \<union> ?B') (G.stabilizer C) - G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using card_mono hsub calculation(3)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using card_Diff_subset
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
finite (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
finite (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
\<lbrakk>finite ?B; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> card (?A - ?B) = card ?A - card ?B

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
have "... = int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) - card (G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) = int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using card_Diff_subset[OF hfinsumH1 hsubsumH1] hsumH1card_le
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) = card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) - card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) = int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) - G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) = int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.stabilizer C)) - card (G.sumset ?A1 ?H1) - card (G.sumset ?B1 ?H1)
                \<le> int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) - card (G.sumset (A \<union> ?B') ?H1)"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using hCG subset_iff G.card_sumset_singleton_subset_eq G.stabilizer_subset_group
                hAG ha1A
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset {a1} (G.stabilizer C))) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
C \<subseteq> G
(?A \<subseteq> ?B) = (\<forall>t. t \<in> ?A \<longrightarrow> t \<in> ?B)
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> card (G.sumset {?a} ?A) = card ?A
G.stabilizer ?S \<subseteq> G
A \<subseteq> G
a1 \<in> A

goal (1 subgoal):
 1. int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) \<Longrightarrow> False
[PROOF STEP]
thus "False"
[PROOF STATE]
proof (prove)
using this:
int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. False
[PROOF STEP]
using hA1B1ineq
[PROOF STATE]
proof (prove)
using this:
int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) \<noteq> G.sumset {b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) -
              card (G.sumset (A \<union> ?B') ?H1) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by (simp add: hsumH1card_le)
[PROOF STATE]
proof (state)
this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.stabilizer C)) -
              card (G.sumset ?A1 ?H1) - card (G.sumset ?B1 ?H1) > 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. 0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using hA1B1ineq
[PROOF STATE]
proof (prove)
using this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. 0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card ?H1) dvd int (card (G.stabilizer C)) -
              card (G.sumset ?A1 ?H1) - card (G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using
              G.stabilizer_subset_stabilizer_dvd hH1stabC psubset_imp_subset int_dvd_int_iff dvd_diff
              G.card_stabilizer_divide_sumset[OF hA1G] G.card_stabilizer_divide_sumset[OF hB1G]
[PROOF STATE]
proof (prove)
using this:
G.stabilizer ?A \<subseteq> G.stabilizer ?B \<Longrightarrow> card (G.stabilizer ?A) dvd card (G.stabilizer ?B)
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B
(int ?m dvd int ?n) = (?m dvd ?n)
\<lbrakk>?x dvd ?y; ?x dvd ?z\<rbrakk> \<Longrightarrow> ?x dvd ?y - ?z
card (G.stabilizer ?B) dvd card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer ?B))
card (G.stabilizer ?B) dvd card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer ?B))

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.stabilizer C)) -
              card (G.sumset ?A1 ?H1) - card (G.sumset ?B1 ?H1) \<ge> int (card ?H1)"
[PROOF STATE]
proof (prove)
using this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using zdvd_imp_le
[PROOF STATE]
proof (prove)
using this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
\<lbrakk>?z dvd ?n; 0 < ?n\<rbrakk> \<Longrightarrow> ?z \<le> ?n

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA1_le_sum: "card ?A1 \<le> card (G.sumset ?A1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using G.sumset_commute G.card_le_sumset G.zero_mem_stabilizer hA1G hA1 hH1stabC hstabC
[PROOF STATE]
proof (prove)
using this:
G.sumset ?A ?B = G.sumset ?B ?A
\<lbrakk>finite ?A; ?a \<in> ?A; ?a \<in> G; finite ?B; ?B \<subseteq> G\<rbrakk> \<Longrightarrow> card ?B \<le> card (G.sumset ?A ?B)
[\<zero>] \<in> G.stabilizer ?A
A \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
finite (G.stabilizer C)

goal (1 subgoal):
 1. card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by (metis finite_subset psubset_imp_subset G.unit_closed)
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hB1_le_sum: "card ?B1 \<le> card (G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
using G.sumset_commute G.card_le_sumset G.zero_mem_stabilizer hB1G hB1 hH1stabC hstabC
[PROOF STATE]
proof (prove)
using this:
G.sumset ?A ?B = G.sumset ?B ?A
\<lbrakk>finite ?A; ?a \<in> ?A; ?a \<in> G; finite ?B; ?B \<subseteq> G\<rbrakk> \<Longrightarrow> card ?B \<le> card (G.sumset ?A ?B)
[\<zero>] \<in> G.stabilizer ?A
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<subset> G.stabilizer C
finite (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
by (metis finite_subset psubset_imp_subset G.unit_closed)
[PROOF STATE]
proof (state)
this:
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open> The above facts combined allow us to deduce the inequality that is referred to as
     inequality (2) in  \cite{DeVos_Kneser} for @{term ?A1},  @{term ?B1} and @{term ?H1}. \<close>
[PROOF STATE]
proof (state)
this:
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
[PROOF STEP]
have 21: "int (card (G.stabilizer C)) \<ge> int (card ?H1) + card ?A1 + card ?B1"
[PROOF STATE]
proof (prove)
using this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.stabilizer C))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) -
              card (G.sumset (A \<union> ?B') ?H2) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by (simp add: hsumH2card_le)
[PROOF STATE]
proof (state)
this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.stabilizer C)) -
              card (G.sumset ?A2 ?H2) - card (G.sumset ?B2 ?H2) > 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. 0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using hA2B2ineq
[PROOF STATE]
proof (prove)
using this:
0 \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) - int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. 0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card ?H2) dvd int (card (G.stabilizer C)) -
              card (G.sumset ?A2 ?H2) - card (G.sumset ?B2 ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using psubset_imp_subset
              G.stabilizer_subset_stabilizer_dvd hH2stabC int_dvd_int_iff dvd_diff
              G.card_stabilizer_divide_sumset[OF hA2G] G.card_stabilizer_divide_sumset[OF hB2G]
[PROOF STATE]
proof (prove)
using this:
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B
G.stabilizer ?A \<subseteq> G.stabilizer ?B \<Longrightarrow> card (G.stabilizer ?A) dvd card (G.stabilizer ?B)
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
(int ?m dvd int ?n) = (?m dvd ?n)
\<lbrakk>?x dvd ?y; ?x dvd ?z\<rbrakk> \<Longrightarrow> ?x dvd ?y - ?z
card (G.stabilizer ?B) dvd card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer ?B))
card (G.stabilizer ?B) dvd card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer ?B))

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
have "int (card (G.stabilizer C)) -
              card (G.sumset ?A2 ?H2) - card (G.sumset ?B2 ?H2) \<ge> int (card ?H2)"
[PROOF STATE]
proof (prove)
using this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using zdvd_imp_le
[PROOF STATE]
proof (prove)
using this:
0 < int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) dvd int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
\<lbrakk>?z dvd ?n; 0 < ?n\<rbrakk> \<Longrightarrow> ?z \<le> ?n

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hA2_le_sum: "card ?A2 \<le> card (G.sumset ?A2 ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
using G.sumset_commute G.card_le_sumset G.zero_mem_stabilizer G.stabilizer_subset_group
                hA2G hA2 hH2stabC hstabC psubset_imp_subset
[PROOF STATE]
proof (prove)
using this:
G.sumset ?A ?B = G.sumset ?B ?A
\<lbrakk>finite ?A; ?a \<in> ?A; ?a \<in> G; finite ?B; ?B \<subseteq> G\<rbrakk> \<Longrightarrow> card ?B \<le> card (G.sumset ?A ?B)
[\<zero>] \<in> G.stabilizer ?A
G.stabilizer ?S \<subseteq> G
A \<inter> G.sumset {b1} (G.stabilizer C) \<subseteq> G
finite (A \<inter> G.sumset {b1} (G.stabilizer C))
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
finite (G.stabilizer C)
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B

goal (1 subgoal):
 1. card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
by (metis finite_subset G.unit_closed)
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hB2_le_sum: "card ?B2 \<le> card (G.sumset ?B2 ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
using G.sumset_commute G.card_le_sumset G.zero_mem_stabilizer G.stabilizer_subset_group
                hB2G hB2 hH2stabC hstabC psubset_imp_subset
[PROOF STATE]
proof (prove)
using this:
G.sumset ?A ?B = G.sumset ?B ?A
\<lbrakk>finite ?A; ?a \<in> ?A; ?a \<in> G; finite ?B; ?B \<subseteq> G\<rbrakk> \<Longrightarrow> card ?B \<le> card (G.sumset ?A ?B)
[\<zero>] \<in> G.stabilizer ?A
G.stabilizer ?S \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) \<subseteq> G
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<subset> G.stabilizer C
finite (G.stabilizer C)
?A \<subset> ?B \<Longrightarrow> ?A \<subseteq> ?B

goal (1 subgoal):
 1. card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
by (metis finite_subset G.unit_closed)
[PROOF STATE]
proof (state)
this:
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open>Analogously, the above facts combined allow us to deduce the inequality that is referred to as
     inequality (2) in \cite{DeVos_Kneser} for @{term ?A2},  @{term ?B2} and @{term ?H2}. \<close>
[PROOF STATE]
proof (state)
this:
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
[PROOF STEP]
have 22: "int (card (G.stabilizer C)) \<ge> int (card ?H2) + card ?A2 + card ?B2"
[PROOF STATE]
proof (prove)
using this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.stabilizer C)) - int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) - int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.stabilizer C))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?S = "G.sumset {a1} (G.stabilizer C) - (?A1 \<union> ?B2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
let ?T = "G.sumset {b1} (G.stabilizer C) - (?A2 \<union> ?B1)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hS : "finite ?S" and hT: "finite ?T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) &&& finite (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
using G.finite_sumset hstabC
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite (G.stabilizer C)

goal (1 subgoal):
 1. finite (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) &&& finite (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
finite (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hST: "?S \<inter> ?T = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = {}
[PROOF STEP]
using ha1b1stabCne Diff_Int2 Diff_Int_distrib2 Int_Diff Int_Un_eq(4)
              Int_absorb Int_commute Int_empty_right Int_insert_right Un_empty empty_Diff hA1ne
              hA2ne G.sumset_commute G.sumset_is_empty_iff G.sumset_stabilizer_eq_iff
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1} (G.stabilizer C) \<noteq> G.sumset {b1} (G.stabilizer C)
?A \<inter> ?C - ?B \<inter> ?C = ?A \<inter> ?C - ?B
(?A - ?B) \<inter> ?C = ?A \<inter> ?C - ?B \<inter> ?C
?A \<inter> ?B - ?C = ?A \<inter> (?B - ?C)
?T \<union> ?S \<inter> ?T = ?T
?A \<inter> ?A = ?A
?A \<inter> ?B = ?B \<inter> ?A
?A \<inter> {} = {}
?A \<inter> insert ?a ?B = (if ?a \<in> ?A then insert ?a (?A \<inter> ?B) else ?A \<inter> ?B)
(?A \<union> ?B = {}) = (?A = {} \<and> ?B = {})
{} - ?A = {}
A \<inter> G.sumset {a1} (G.stabilizer C) \<noteq> {}
A \<inter> G.sumset {b1} (G.stabilizer C) \<noteq> {}
G.sumset ?A ?B = G.sumset ?B ?A
(G.sumset ?A ?B = {}) = (?A \<inter> G = {} \<or> ?B \<inter> G = {})
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> (G.sumset {?a} (G.stabilizer ?A) = G.sumset {?b} (G.stabilizer ?A)) = (G.sumset {?a} (G.stabilizer ?A) \<inter> G.sumset {?b} (G.stabilizer ?A) \<noteq> {})

goal (1 subgoal):
 1. (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = {}
[PROOF STEP]
by (smt (verit, ccfv_threshold) G.sumset_assoc)
[PROOF STATE]
proof (state)
this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = {}

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hSTcard_le: "card ?S + card ?T + card (G.sumset (A \<union> ?B') {[\<zero>]}) \<le>
                card (G.sumset (A \<union> ?B') (G.stabilizer C))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
have "G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> ?B') (G.stabilizer C)" and
                "G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> ?B') (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) &&& G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
using G.sumset_mono ha1A hb1B' subset_refl empty_subsetI insert_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B
a1 \<in> A
b1 \<in> G.sumset (G.differenceset B {b}) {a}
?A \<subseteq> ?A
{} \<subseteq> ?A
(insert ?x ?A \<subseteq> ?B) = (?x \<in> ?B \<and> ?A \<subseteq> ?B)

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C) &&& G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
have "(G.sumset (A \<union> ?B') {[\<zero>]}) \<subseteq> G.sumset (A \<union> ?B') (G.stabilizer C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
using G.sumset_mono subset_refl empty_subsetI insert_subset G.zero_mem_stabilizer
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B
?A \<subseteq> ?A
{} \<subseteq> ?A
(insert ?x ?A \<subseteq> ?B) = (?x \<in> ?B \<and> ?A \<subseteq> ?B)
[\<zero>] \<in> G.stabilizer ?A

goal (1 subgoal):
 1. G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
have hsub: "?S \<union> ?T \<union> (G.sumset (A \<union> ?B') {[\<zero>]}) \<subseteq>
                G.sumset (A \<union> ?B') (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
have "?S \<inter> G.sumset (A \<union> ?B') {[\<zero>]} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
have "(?S \<union> ?T) \<inter> G.sumset (A \<union> ?B') {[\<zero>]} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
[PROOF STEP]
have "card ?S + card ?T + card (G.sumset (A \<union> ?B') {[\<zero>]}) =
                card (?S \<union> ?T \<union> (G.sumset (A \<union> ?B') {[\<zero>]}))"
[PROOF STATE]
proof (prove)
using this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) = card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})
[PROOF STEP]
using card_Un_disjoint hS hT
                G.finite_sumset finite_UnI hA hB' hST
[PROOF STATE]
proof (prove)
using this:
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<inter> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} = {}
\<lbrakk>finite ?A; finite ?B; ?A \<inter> ?B = {}\<rbrakk> \<Longrightarrow> card (?A \<union> ?B) = card ?A + card ?B
finite (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))
finite (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
\<lbrakk>finite ?F; finite ?G\<rbrakk> \<Longrightarrow> finite (?F \<union> ?G)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
(G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<inter> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) = {}

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) = card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})
[PROOF STEP]
by (metis finite.emptyI finite.insertI)
[PROOF STATE]
proof (state)
this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) = card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) = card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
have "... \<le> card (G.sumset (A \<union> ?B') (G.stabilizer C))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
using card_mono
                G.finite_sumset finite_UnI hA hB' hstabC hsub
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
\<lbrakk>finite ?F; finite ?G\<rbrakk> \<Longrightarrow> finite (?F \<union> ?G)
finite A
finite (G.sumset (G.differenceset B {b}) {a})
finite (G.stabilizer C)
G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]} \<subseteq> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<union> G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have hAB_not_conv: "\<not> G.convergent (G.sumset A ?B') A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> G.convergent (G.sumset A (G.sumset (G.differenceset B {b}) {a})) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hCmin hstab0
                G.convergent_set_def hcardstabC_gt_1 hstab0'
[PROOF STATE]
proof (prove)
using this:
?Y \<in> G.convergent_set A (G.sumset (G.differenceset B {b}) {a}) \<Longrightarrow> card (G.stabilizer C) \<le> card (G.stabilizer ?Y)
G.stabilizer (G.sumset A B) = {[\<zero>]}
G.convergent_set ?A ?B = {C. G.convergent C ?A ?B}
1 < card (G.stabilizer C)
G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}

goal (1 subgoal):
 1. \<not> G.convergent (G.sumset A (G.sumset (G.differenceset B {b}) {a})) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<not> G.convergent (G.sumset A (G.sumset (G.differenceset B {b}) {a})) A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> G.convergent (G.sumset A (G.sumset (G.differenceset B {b}) {a})) A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
have "card (G.sumset A ?B') + card {[\<zero>]} < card (A \<inter> ?B') +
              card (G.sumset (A \<union> ?B') {[\<zero>]})"
[PROOF STATE]
proof (prove)
using this:
\<not> G.convergent (G.sumset A (G.sumset (G.differenceset B {b}) {a})) A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) + card {[\<zero>]} < card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})
[PROOF STEP]
using G.convergent_def hAne hB'ne hAG hB'G hstab0'
              subset_refl
[PROOF STATE]
proof (prove)
using this:
\<not> G.convergent (G.sumset A (G.sumset (G.differenceset B {b}) {a})) A (G.sumset (G.differenceset B {b}) {a})
G.convergent ?C ?A ?B \<equiv> ?C \<subseteq> G.sumset ?A ?B \<and> ?C \<noteq> {} \<and> card (?A \<inter> ?B) + card (G.sumset (?A \<union> ?B) (G.stabilizer ?C)) \<le> card ?C + card (G.stabilizer ?C)
A \<noteq> {}
G.sumset (G.differenceset B {b}) {a} \<noteq> {}
A \<subseteq> G
G.sumset (G.differenceset B {b}) {a} \<subseteq> G
G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}
?A \<subseteq> ?A

goal (1 subgoal):
 1. card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) + card {[\<zero>]} < card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) + card {[\<zero>]} < card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) + card {[\<zero>]} < card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})
[PROOF STEP]
have hAB'sum: "int (card (G.sumset (A \<union> ?B') {[\<zero>]})) + card (A \<inter> ?B') -
              card (G.sumset A ?B') > 1"
[PROOF STATE]
proof (prove)
using this:
card (G.sumset A (G.sumset (G.differenceset B {b}) {a})) + card {[\<zero>]} < card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})

goal (1 subgoal):
 1. 1 < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
1 < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card ?A1) + card ?B1 \<le> int (card (G.sumset ?A1 ?H1)) +
              card (G.sumset ?B1 ?H1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
using hA1_le_sum hB1_le_sum
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
hence "int (card ?A1) + card ?B1 - card ?H1 \<le> card (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (prove)
using this:
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
using hindA1B1
[PROOF STATE]
proof (prove)
using this:
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
1 < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
have "int (card ?S) + card ?T + card ?A1 + card ?B1 - card ?H1 <
              int (card ?S) + card ?T + card (G.sumset (A \<union> ?B') {[\<zero>]}) + card (A \<inter> ?B') -
              card (G.sumset A ?B') + card (G.sumset ?A1 ?B1)"
[PROOF STATE]
proof (prove)
using this:
1 < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a})))
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))))
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... \<le> int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) + card (A \<inter> ?B') - card C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
have "G.sumset ?A1 ?B1 \<union> C \<subseteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hC G.sumset_mono
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
have "card (G.sumset ?A1 ?B1) + card C \<le>
                card (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
using card_Un_disjoint hCfinite G.finite_sumset hA1 hB1 hA1B1Cempty
                  card_mono hA hB'
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?A; finite ?B; ?A \<inter> ?B = {}\<rbrakk> \<Longrightarrow> card (?A \<union> ?B) = card ?A + card ?B
finite C
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite (A \<inter> G.sumset {a1} (G.stabilizer C))
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
finite A
finite (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
using hSTcard_le
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open>From this, inequality (3) \cite{DeVos_Kneser} follows for @{term ?A1},
            @{term ?B1} and @{term ?H1}.\<close>
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
have 31: "int (card ?S) + card ?T + card ?A1 + card ?B1 - card ?H1 <
              card (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.stabilizer C))
[PROOF STEP]
using hCcard
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.stabilizer C))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "int (card ?A2) + card ?B2 \<le> int (card (G.sumset ?A2 ?H2)) +
              card (G.sumset ?B2 ?H2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
using hA2_le_sum hB2_le_sum
[PROOF STATE]
proof (prove)
using this:
card (A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))
card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
hence "int (card ?A2) + card ?B2 - card ?H2 \<le> card (G.sumset ?A2 ?B2)"
[PROOF STATE]
proof (prove)
using this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
using hindA2B2
[PROOF STATE]
proof (prove)
using this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) - card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
have "int (card ?S) + card ?T + card ?A2 + card ?B2 - card ?H2 <
              int (card ?S) + card ?T + card (G.sumset (A \<union> ?B') {[\<zero>]}) + card (A \<inter> ?B') -
              card (G.sumset A ?B') + card (G.sumset ?A2 ?B2)"
[PROOF STATE]
proof (prove)
using this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
using hAB'sum
[PROOF STATE]
proof (prove)
using this:
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))))) + int (card (G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))))
int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) \<le> int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
1 < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a})))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "... \<le> int (card (G.sumset (A \<union> ?B') (G.stabilizer C))) + card (A \<inter> ?B') - card C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
have "G.sumset ?A2 ?B2 \<union> C \<subseteq> G.sumset A ?B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
using hC G.sumset_mono
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B

goal (1 subgoal):
 1. G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
[PROOF STEP]
have "card (G.sumset ?A2 ?B2) + card C \<le>
                card (G.sumset A ?B')"
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
using card_Un_disjoint hCfinite G.finite_sumset hA2 hB2 hA1B1Cempty
                  card_mono hA hB' hB2A2Cempty G.sumset_commute
[PROOF STATE]
proof (prove)
using this:
G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> C \<subseteq> G.sumset A (G.sumset (G.differenceset B {b}) {a})
\<lbrakk>finite ?A; finite ?B; ?A \<inter> ?B = {}\<rbrakk> \<Longrightarrow> card (?A \<union> ?B) = card ?A + card ?B
finite C
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite (A \<inter> G.sumset {b1} (G.stabilizer C))
finite (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
finite A
finite (G.sumset (G.differenceset B {b}) {a})
G.sumset (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) (A \<inter> G.sumset {b1} (G.stabilizer C)) \<inter> C = {}
G.sumset ?A ?B = G.sumset ?B ?A

goal (1 subgoal):
 1. card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
using hSTcard_le
[PROOF STATE]
proof (prove)
using this:
card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card C \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) \<le> card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open>From this, inequality (3) \cite{DeVos_Kneser} follows for @{term ?A2},
            @{term ?B2} and @{term ?H2}.\<close>
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) {[\<zero>]})) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))) + int (card (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) \<le> int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
[PROOF STEP]
have 32: "int (card ?S) + card ?T + card ?A2 + card ?B2 - card ?H2 <
              card (G.stabilizer C)"
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.stabilizer C))
[PROOF STEP]
using hCcard
[PROOF STATE]
proof (prove)
using this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C))) + int (card (A \<inter> G.sumset (G.differenceset B {b}) {a})) - int (card C)
card (A \<inter> G.sumset (G.differenceset B {b}) {a}) + card (G.sumset (A \<union> G.sumset (G.differenceset B {b}) {a}) (G.stabilizer C)) \<le> card C + card (G.stabilizer C)

goal (1 subgoal):
 1. int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.stabilizer C))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open> Adding together the four inequalities obtained by versions of inequalities
               (2) and (3) and dividing by 2 gives the following inequality: \<close>
[PROOF STATE]
proof (state)
this:
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have 4: "2 * int (card (G.stabilizer C)) > int (card ?A1) + card ?B2 + card ?S + card ?T + card ?B1 + card ?A2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) < 2 * int (card (G.stabilizer C))
[PROOF STEP]
using 21 22 31 32
[PROOF STATE]
proof (prove)
using this:
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) \<le> int (card (G.stabilizer C))
int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) \<le> int (card (G.stabilizer C))
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {a1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))))) < int (card (G.stabilizer C))
int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) - int (card (G.stabilizer (G.sumset (A \<inter> G.sumset {b1} (G.stabilizer C)) (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))))) < int (card (G.stabilizer C))

goal (1 subgoal):
 1. int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) < 2 * int (card (G.stabilizer C))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) < 2 * int (card (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "G.sumset {a1} (G.stabilizer C) = (?S \<union> ?A1) \<union> ?B2" and
              hb1T: "G.sumset {b1} (G.stabilizer C) = (?T \<union> ?A2) \<union> ?B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset {a1} (G.stabilizer C) = G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C) &&& G.sumset {b1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset {a1} (G.stabilizer C) = G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset {a1} (G.stabilizer C) = G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
[PROOF STEP]
have "card (G.stabilizer C) \<le> card ?S + card ?A1 + card ?B2"
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1} (G.stabilizer C) = G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)

goal (1 subgoal):
 1. card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
[PROOF STEP]
using card_Un_le[of "?S" "?A1"] card_Un_le[of "?S \<union> ?A1" "?B2"]
                G.card_sumset_singleton_subset_eq G.stabilizer_subset_group ha1A hAG
[PROOF STATE]
proof (prove)
using this:
G.sumset {a1} (G.stabilizer C) = G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)
G.sumset {b1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C))
card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)) \<union> A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> card (G.sumset {?a} ?A) = card ?A
G.stabilizer ?S \<subseteq> G
a1 \<in> A
A \<subseteq> G

goal (1 subgoal):
 1. card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
have "card (G.stabilizer C) \<le> card ?T + card ?A2 + card ?B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
[PROOF STEP]
using hb1T card_Un_le[of "?T" "?A2"] card_Un_le[of "?T \<union> ?A2" "?B1"]
              G.card_sumset_singleton_subset_eq G.stabilizer_subset_group hb1B' hB'G
[PROOF STATE]
proof (prove)
using this:
G.sumset {b1} (G.stabilizer C) = G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)
card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C))
card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)) \<union> A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
\<lbrakk>?a \<in> G; ?A \<subseteq> G\<rbrakk> \<Longrightarrow> card (G.sumset {?a} ?A) = card ?A
G.stabilizer ?S \<subseteq> G
b1 \<in> G.sumset (G.differenceset B {b}) {a}
G.sumset (G.differenceset B {b}) {a} \<subseteq> G

goal (1 subgoal):
 1. card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
text\<open> Combining the inequality labelled @{term 4} above with the above facts, the claim
     follows:\<close>
[PROOF STATE]
proof (state)
this:
card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))

goal (1 subgoal):
 1. G.stabilizer C \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))

goal (1 subgoal):
 1. card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
card (G.stabilizer C) \<le> card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + card (A \<inter> G.sumset {a1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))
card (G.stabilizer C) \<le> card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + card (A \<inter> G.sumset {b1} (G.stabilizer C)) + card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))
int (card (A \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C))) + int (card (G.sumset {a1} (G.stabilizer C) - (A \<inter> G.sumset {a1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {a1} (G.stabilizer C)))) + int (card (G.sumset {b1} (G.stabilizer C) - (A \<inter> G.sumset {b1} (G.stabilizer C) \<union> G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C)))) + int (card (G.sumset (G.differenceset B {b}) {a} \<inter> G.sumset {b1} (G.stabilizer C))) + int (card (A \<inter> G.sumset {b1} (G.stabilizer C))) < 2 * int (card (G.stabilizer C))

goal (1 subgoal):
 1. card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
text\<open>It remains to transfer the statement of inequality labelled @{term 1} into an analogous
       one, which replaces @{term ?B'} with @{term B}. \<close>
[PROOF STATE]
proof (state)
this:
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have 2: "card (G.sumset A (G.stabilizer (G.sumset A B))) =
            card (G.sumset A (G.stabilizer (G.sumset A ?B')))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.sumset A (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
[PROOF STEP]
using hstabeq
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.sumset A (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.sumset A (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have 3: "card (G.sumset B (G.stabilizer (G.sumset A B))) =
            card (G.sumset ?B' (G.stabilizer (G.sumset A ?B')))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
[PROOF STEP]
using hstabeq hstab0' G.sumset_commute
[PROOF STATE]
proof (prove)
using this:
G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}
G.sumset ?A ?B = G.sumset ?B ?A

goal (1 subgoal):
 1. card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
[PROOF STEP]
by (metis G.card_differenceset_singleton_mem_eq G.card_sumset_singleton_subset_eq
            G.sumset_D(1) G.sumset_commute G.sumset_subset_carrier Int_absorb1 Int_commute hBG ha1G hbG)
[PROOF STATE]
proof (state)
this:
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))

goal (1 subgoal):
 1. card A \<noteq> 1 \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
using 1 2 3 hstabeq hstab0' htranslate
[PROOF STATE]
proof (prove)
using this:
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
card (G.sumset A B) = card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.sumset A (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.sumset (G.sumset (G.differenceset B {b}) {a}) (G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))))
G.stabilizer (G.sumset A B) = G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a}))
G.stabilizer (G.sumset A (G.sumset (G.differenceset B {b}) {a})) = {[\<zero>]}
card (G.sumset A {[\<zero>]}) + card (G.sumset (G.sumset (G.differenceset B {b}) {a}) {[\<zero>]}) - card {[\<zero>]} \<le> card (G.sumset A (G.sumset (G.differenceset B {b}) {a}))

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
case hstabne0: False
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]}

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
let ?K = "G.stabilizer (G.sumset A B)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hcardK_gt_1: "card ?K > 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < card (G.stabilizer (G.sumset A B))
[PROOF STEP]
using G.stabilizer_finite G.sumset_subset_carrier G.finite_sumset
          hA hB hstabne0 G.zero_mem_stabilizer
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?S \<subseteq> G; ?S \<noteq> {}; finite ?S\<rbrakk> \<Longrightarrow> finite (G.stabilizer ?S)
G.sumset ?A ?B \<subseteq> G
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite B
G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]}
[\<zero>] \<in> G.stabilizer ?A

goal (1 subgoal):
 1. 1 < card (G.stabilizer (G.sumset A B))
[PROOF STEP]
by (metis card_0_eq card_1_singletonE G.card_sumset_0_iff
          empty_iff hAG hAne hBG hBne insertE less_one linorder_neqE_nat)
[PROOF STATE]
proof (state)
this:
1 < card (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
interpret K: subgroup_of_additive_abelian_group ?K G "([\<oplus>])" "[\<zero>]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup_of_additive_abelian_group (G.stabilizer (G.sumset A B)) G ([\<oplus>]) [\<zero>]
[PROOF STEP]
using G.stabilizer_is_subgroup subgroup_of_additive_abelian_group_def
[PROOF STATE]
proof (prove)
using this:
subgroup (G.stabilizer ?S) G ([\<oplus>]) [\<zero>]
subgroup_of_additive_abelian_group ?H ?G ?addition ?zero \<equiv> subgroup_of_abelian_group ?H ?G ?addition ?zero \<and> additive_abelian_group ?G ?addition ?zero

goal (1 subgoal):
 1. subgroup_of_additive_abelian_group (G.stabilizer (G.sumset A B)) G ([\<oplus>]) [\<zero>]
[PROOF STEP]
by (metis G.abelian_group_axioms G.group_axioms hGroupG subgroup_of_abelian_group_def
            subgroup_of_group.intro)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
let ?\<phi> = "K.Class"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have h\<phi>: "\<And> a. a \<in> G \<Longrightarrow> ?\<phi> a = (\<lambda> x. G.sumset {x} ?K) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. a \<in> G \<Longrightarrow> K.Class a = G.sumset {a} (G.stabilizer (G.sumset A B))
[PROOF STEP]
using K.Left_Coset_Class_unit G.Left_Coset_eq_sumset_stabilizer
[PROOF STATE]
proof (prove)
using this:
?g \<in> G \<Longrightarrow> K.Left_Coset ?g (G.stabilizer (G.sumset A B)) = K.Class ?g
?x \<in> G \<Longrightarrow> G.sumset {?x} (G.stabilizer ?B) = K.Left_Coset ?x (G.stabilizer ?B)

goal (1 subgoal):
 1. \<And>a. a \<in> G \<Longrightarrow> K.Class a = G.sumset {a} (G.stabilizer (G.sumset A B))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?a \<in> G \<Longrightarrow> K.Class ?a = G.sumset {?a} (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
interpret GK: additive_abelian_group "G.Factor_Group G ?K" K.quotient_composition "K.Class [\<zero>]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> K.Partition; y \<in> K.Partition\<rbrakk> \<Longrightarrow> K.quotient_composition x y = K.quotient_composition y x
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> K.Partition; y \<in> K.Partition\<rbrakk> \<Longrightarrow> K.quotient_composition x y = K.quotient_composition y x
[PROOF STEP]
assume "x \<in> K.Partition" and "y \<in> K.Partition"
[PROOF STATE]
proof (state)
this:
x \<in> K.Partition
y \<in> K.Partition

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> K.Partition; y \<in> K.Partition\<rbrakk> \<Longrightarrow> K.quotient_composition x y = K.quotient_composition y x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> K.Partition
y \<in> K.Partition
[PROOF STEP]
obtain a b where "x = K.Class a" and "y = K.Class b" and "a \<in> G" and "b \<in> G"
[PROOF STATE]
proof (prove)
using this:
x \<in> K.Partition
y \<in> K.Partition

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>x = K.Class a; y = K.Class b; a \<in> G; b \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson K.representant_exists)
[PROOF STATE]
proof (state)
this:
x = K.Class a
y = K.Class b
a \<in> G
b \<in> G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> K.Partition; y \<in> K.Partition\<rbrakk> \<Longrightarrow> K.quotient_composition x y = K.quotient_composition y x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = K.Class a
y = K.Class b
a \<in> G
b \<in> G
[PROOF STEP]
show "K.quotient_composition x y = K.quotient_composition y x"
[PROOF STATE]
proof (prove)
using this:
x = K.Class a
y = K.Class b
a \<in> G
b \<in> G

goal (1 subgoal):
 1. K.quotient_composition x y = K.quotient_composition y x
[PROOF STEP]
using K.Class_commutes_with_composition G.commutative
[PROOF STATE]
proof (prove)
using this:
x = K.Class a
y = K.Class b
a \<in> G
b \<in> G
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> K.quotient_composition (K.Class ?a) (K.Class ?b) = K.Class (?a [\<oplus>] ?b)
\<lbrakk>?x \<in> G; ?y \<in> G\<rbrakk> \<Longrightarrow> ?x [\<oplus>] ?y = ?y [\<oplus>] ?x

goal (1 subgoal):
 1. K.quotient_composition x y = K.quotient_composition y x
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
K.quotient_composition x y = K.quotient_composition y x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hGroupGK: "additive_abelian_group (G.Factor_Group G ?K) K.quotient_composition (K.Class [\<zero>])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
text\<open>Here, we specialize the induction hypothesis to the factor group.\<close>
[PROOF STATE]
proof (state)
this:
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
let ?K_repr = "K.\<phi> ` K.Partition"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "\<And> x y. x \<in> ?K_repr \<Longrightarrow> y \<in> ?K_repr \<Longrightarrow> K.quot_comp_alt x y = K.quot_comp_alt y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> K.\<phi> ` K.Partition; y \<in> K.\<phi> ` K.Partition\<rbrakk> \<Longrightarrow> K.quot_comp_alt x y = K.quot_comp_alt y x
[PROOF STEP]
using K.quot_comp_alt_def G.commutative K.phi_image_subset subsetD
[PROOF STATE]
proof (prove)
using this:
K.quot_comp_alt ?a ?b = K.\<phi> (K.Left_Coset (?a [\<oplus>] ?b) (G.stabilizer (G.sumset A B)))
\<lbrakk>?x \<in> G; ?y \<in> G\<rbrakk> \<Longrightarrow> ?x [\<oplus>] ?y = ?y [\<oplus>] ?x
K.\<phi> ` K.Partition \<subseteq> G
\<lbrakk>?A \<subseteq> ?B; ?c \<in> ?A\<rbrakk> \<Longrightarrow> ?c \<in> ?B

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> K.\<phi> ` K.Partition; y \<in> K.\<phi> ` K.Partition\<rbrakk> \<Longrightarrow> K.quot_comp_alt x y = K.quot_comp_alt y x
[PROOF STEP]
by (metis (full_types))
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> K.\<phi> ` K.Partition; ?y \<in> K.\<phi> ` K.Partition\<rbrakk> \<Longrightarrow> K.quot_comp_alt ?x ?y = K.quot_comp_alt ?y ?x

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?x \<in> K.\<phi> ` K.Partition; ?y \<in> K.\<phi> ` K.Partition\<rbrakk> \<Longrightarrow> K.quot_comp_alt ?x ?y = K.quot_comp_alt ?y ?x
[PROOF STEP]
interpret K_repr: additive_abelian_group ?K_repr K.quot_comp_alt "K.\<phi> ?K"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> K.\<phi> ` K.Partition; ?y \<in> K.\<phi> ` K.Partition\<rbrakk> \<Longrightarrow> K.quot_comp_alt ?x ?y = K.quot_comp_alt ?y ?x

goal (1 subgoal):
 1. additive_abelian_group (K.\<phi> ` K.Partition) K.quot_comp_alt (K.\<phi> (G.stabilizer (G.sumset A B)))
[PROOF STEP]
using Group_Theory.group.axioms(1)[OF K.phi_image_group]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> K.\<phi> ` K.Partition; ?y \<in> K.\<phi> ` K.Partition\<rbrakk> \<Longrightarrow> K.quot_comp_alt ?x ?y = K.quot_comp_alt ?y ?x
Group_Theory.monoid (K.\<phi> ` K.Partition) K.quot_comp_alt (K.\<phi> (G.stabilizer (G.sumset A B)))

goal (1 subgoal):
 1. additive_abelian_group (K.\<phi> ` K.Partition) K.quot_comp_alt (K.\<phi> (G.stabilizer (G.sumset A B)))
[PROOF STEP]
by (auto simp add: additive_abelian_group_def abelian_group_def K.phi_image_group
            commutative_monoid_axioms_def commutative_monoid_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hindrepr: "\<And> m C D. m < n \<longrightarrow> C \<subseteq> ?K_repr \<longrightarrow> D \<subseteq> ?K_repr \<longrightarrow> finite C \<longrightarrow>
          finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (K_repr.sumset C D) + card C = m \<longrightarrow>
          card (K_repr.sumset C (K_repr.stabilizer (K_repr.sumset C D))) +
          card (K_repr.sumset D (K_repr.stabilizer (K_repr.sumset C D))) - card (K_repr.stabilizer (K_repr.sumset C D)) \<le>
          card (K_repr.sumset C D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m C D. m < n \<longrightarrow> C \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> D \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (K_repr.sumset C D) + card C = m \<longrightarrow> card (K_repr.sumset C (K_repr.stabilizer (K_repr.sumset C D))) + card (K_repr.sumset D (K_repr.stabilizer (K_repr.sumset C D))) - card (K_repr.stabilizer (K_repr.sumset C D)) \<le> card (K_repr.sumset C D)
[PROOF STEP]
using hind K_repr.additive_abelian_group_axioms
[PROOF STATE]
proof (prove)
using this:
\<forall>m<n. \<forall>x xa xb xc xd. additive_abelian_group xb xc xd \<longrightarrow> x \<subseteq> xb \<longrightarrow> xa \<subseteq> xb \<longrightarrow> finite x \<longrightarrow> finite xa \<longrightarrow> x \<noteq> {} \<longrightarrow> xa \<noteq> {} \<longrightarrow> card (additive_abelian_group.sumset xb xc x xa) + card x = m \<longrightarrow> card (additive_abelian_group.sumset xb xc x (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) + card (additive_abelian_group.sumset xb xc xa (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa))) - card (additive_abelian_group.stabilizer xb xc (additive_abelian_group.sumset xb xc x xa)) \<le> card (additive_abelian_group.sumset xb xc x xa)
additive_abelian_group (K.\<phi> ` K.Partition) K.quot_comp_alt (K.\<phi> (G.stabilizer (G.sumset A B)))

goal (1 subgoal):
 1. \<And>m C D. m < n \<longrightarrow> C \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> D \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (K_repr.sumset C D) + card C = m \<longrightarrow> card (K_repr.sumset C (K_repr.stabilizer (K_repr.sumset C D))) + card (K_repr.sumset D (K_repr.stabilizer (K_repr.sumset C D))) - card (K_repr.stabilizer (K_repr.sumset C D)) \<le> card (K_repr.sumset C D)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?m < n \<longrightarrow> ?C \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> ?D \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> finite ?C \<longrightarrow> finite ?D \<longrightarrow> ?C \<noteq> {} \<longrightarrow> ?D \<noteq> {} \<longrightarrow> card (K_repr.sumset ?C ?D) + card ?C = ?m \<longrightarrow> card (K_repr.sumset ?C (K_repr.stabilizer (K_repr.sumset ?C ?D))) + card (K_repr.sumset ?D (K_repr.stabilizer (K_repr.sumset ?C ?D))) - card (K_repr.stabilizer (K_repr.sumset ?C ?D)) \<le> card (K_repr.sumset ?C ?D)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hindfactor: "\<And> m C D. m < n \<longrightarrow>  C \<subseteq> K.Partition \<longrightarrow> D \<subseteq> K.Partition \<longrightarrow> finite C \<longrightarrow>
          finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (GK.sumset C D) + card C = m \<longrightarrow>
          card (GK.sumset C (GK.stabilizer (GK.sumset C D))) +
          card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le>
          card (GK.sumset C D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m C D. m < n \<longrightarrow> C \<subseteq> K.Partition \<longrightarrow> D \<subseteq> K.Partition \<longrightarrow> finite C \<longrightarrow> finite D \<longrightarrow> C \<noteq> {} \<longrightarrow> D \<noteq> {} \<longrightarrow> card (GK.sumset C D) + card C = m \<longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
proof(intro impI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
fix m C D
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
assume hmn: "m < n" and hCK: "C \<subseteq> K.Partition" and hDK: "D \<subseteq> K.Partition" and
          hC: "finite C" and hD: "finite D" and hCne: "C \<noteq> {}" and hDne: "D \<noteq> {}" and
          hCDcard: "card (GK.sumset C D) + card C = m"
[PROOF STATE]
proof (state)
this:
m < n
C \<subseteq> K.Partition
D \<subseteq> K.Partition
finite C
finite D
C \<noteq> {}
D \<noteq> {}
card (GK.sumset C D) + card C = m

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
let ?C = "K.\<phi> ` C" and ?D = "K.\<phi> ` D"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
have hCrepr: "?C \<subseteq> ?K_repr" and hDrepr: "?D \<subseteq> ?K_repr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K.\<phi> ` C \<subseteq> K.\<phi> ` K.Partition &&& K.\<phi> ` D \<subseteq> K.\<phi> ` K.Partition
[PROOF STEP]
using hCK hDK
[PROOF STATE]
proof (prove)
using this:
C \<subseteq> K.Partition
D \<subseteq> K.Partition

goal (1 subgoal):
 1. K.\<phi> ` C \<subseteq> K.\<phi> ` K.Partition &&& K.\<phi> ` D \<subseteq> K.\<phi> ` K.Partition
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
K.\<phi> ` C \<subseteq> K.\<phi> ` K.Partition
K.\<phi> ` D \<subseteq> K.\<phi> ` K.Partition

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
have hCfin: "finite ?C" and hDfin: "finite ?D" and hCne_1: "?C \<noteq> {}" and hDne_1: "?D \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (finite (K.\<phi> ` C) &&& finite (K.\<phi> ` D)) &&& K.\<phi> ` C \<noteq> {} &&& K.\<phi> ` D \<noteq> {}
[PROOF STEP]
using hC hD hCne hDne
[PROOF STATE]
proof (prove)
using this:
finite C
finite D
C \<noteq> {}
D \<noteq> {}

goal (1 subgoal):
 1. (finite (K.\<phi> ` C) &&& finite (K.\<phi> ` D)) &&& K.\<phi> ` C \<noteq> {} &&& K.\<phi> ` D \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (K.\<phi> ` C)
finite (K.\<phi> ` D)
K.\<phi> ` C \<noteq> {}
K.\<phi> ` D \<noteq> {}

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
have hcardC: "card ?C = card C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (K.\<phi> ` C) = card C
[PROOF STEP]
using K.phi_inj_on hC card_image inj_on_subset hCK
[PROOF STATE]
proof (prove)
using this:
inj_on K.\<phi> K.Partition
finite C
inj_on ?f ?A \<Longrightarrow> card (?f ` ?A) = card ?A
\<lbrakk>inj_on ?f ?A; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> inj_on ?f ?B
C \<subseteq> K.Partition

goal (1 subgoal):
 1. card (K.\<phi> ` C) = card C
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
card (K.\<phi> ` C) = card C

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
have "card (GK.sumset C D) = card (K_repr.sumset ?C ?D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (GK.sumset C D) = card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
[PROOF STEP]
using card_image K.phi_inj_on inj_on_subset K.phi_image_sumset_eq
              GK.sumset_subset_carrier hCK hDK
[PROOF STATE]
proof (prove)
using this:
inj_on ?f ?A \<Longrightarrow> card (?f ` ?A) = card ?A
inj_on K.\<phi> K.Partition
\<lbrakk>inj_on ?f ?A; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> inj_on ?f ?B
\<lbrakk>?A \<subseteq> K.Partition; ?B \<subseteq> K.Partition\<rbrakk> \<Longrightarrow> K.\<phi> ` GK.sumset ?A ?B = K_repr.sumset (K.\<phi> ` ?A) (K.\<phi> ` ?B)
GK.sumset ?A ?B \<subseteq> K.Partition
C \<subseteq> K.Partition
D \<subseteq> K.Partition

goal (1 subgoal):
 1. card (GK.sumset C D) = card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
[PROOF STEP]
by (smt (verit, best))
[PROOF STATE]
proof (state)
this:
card (GK.sumset C D) = card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (GK.sumset C D) = card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
[PROOF STEP]
have "card (K_repr.sumset ?C ?D) + card ?C = m"
[PROOF STATE]
proof (prove)
using this:
card (GK.sumset C D) = card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))

goal (1 subgoal):
 1. card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)) + card (K.\<phi> ` C) = m
[PROOF STEP]
using hCDcard hcardC
[PROOF STATE]
proof (prove)
using this:
card (GK.sumset C D) = card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
card (GK.sumset C D) + card C = m
card (K.\<phi> ` C) = card C

goal (1 subgoal):
 1. card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)) + card (K.\<phi> ` C) = m
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)) + card (K.\<phi> ` C) = m

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)) + card (K.\<phi> ` C) = m
[PROOF STEP]
have "card (K_repr.sumset ?C (K_repr.stabilizer (K_repr.sumset ?C ?D))) +
          card (K_repr.sumset ?D (K_repr.stabilizer (K_repr.sumset ?C ?D))) - card (K_repr.stabilizer (K_repr.sumset ?C ?D)) \<le>
          card (K_repr.sumset ?C ?D)"
[PROOF STATE]
proof (prove)
using this:
card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)) + card (K.\<phi> ` C) = m

goal (1 subgoal):
 1. card (K_repr.sumset (K.\<phi> ` C) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) + card (K_repr.sumset (K.\<phi> ` D) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) - card (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))) \<le> card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
[PROOF STEP]
using hindrepr hCfin hDfin hCne_1 hDne_1 hCrepr hDrepr hmn
[PROOF STATE]
proof (prove)
using this:
card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)) + card (K.\<phi> ` C) = m
?m < n \<longrightarrow> ?C \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> ?D \<subseteq> K.\<phi> ` K.Partition \<longrightarrow> finite ?C \<longrightarrow> finite ?D \<longrightarrow> ?C \<noteq> {} \<longrightarrow> ?D \<noteq> {} \<longrightarrow> card (K_repr.sumset ?C ?D) + card ?C = ?m \<longrightarrow> card (K_repr.sumset ?C (K_repr.stabilizer (K_repr.sumset ?C ?D))) + card (K_repr.sumset ?D (K_repr.stabilizer (K_repr.sumset ?C ?D))) - card (K_repr.stabilizer (K_repr.sumset ?C ?D)) \<le> card (K_repr.sumset ?C ?D)
finite (K.\<phi> ` C)
finite (K.\<phi> ` D)
K.\<phi> ` C \<noteq> {}
K.\<phi> ` D \<noteq> {}
K.\<phi> ` C \<subseteq> K.\<phi> ` K.Partition
K.\<phi> ` D \<subseteq> K.\<phi> ` K.Partition
m < n

goal (1 subgoal):
 1. card (K_repr.sumset (K.\<phi> ` C) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) + card (K_repr.sumset (K.\<phi> ` D) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) - card (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))) \<le> card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
card (K_repr.sumset (K.\<phi> ` C) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) + card (K_repr.sumset (K.\<phi> ` D) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) - card (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))) \<le> card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))

goal (1 subgoal):
 1. \<And>m C D. \<lbrakk>m < n; C \<subseteq> K.Partition; D \<subseteq> K.Partition; finite C; finite D; C \<noteq> {}; D \<noteq> {}; card (GK.sumset C D) + card C = m\<rbrakk> \<Longrightarrow> card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (K_repr.sumset (K.\<phi> ` C) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) + card (K_repr.sumset (K.\<phi> ` D) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) - card (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))) \<le> card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
[PROOF STEP]
show "card (GK.sumset C (GK.stabilizer (GK.sumset C D))) +
          card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le>
          card (GK.sumset C D)"
[PROOF STATE]
proof (prove)
using this:
card (K_repr.sumset (K.\<phi> ` C) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) + card (K_repr.sumset (K.\<phi> ` D) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) - card (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))) \<le> card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))

goal (1 subgoal):
 1. card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
using K.phi_image_sumset_eq K.phi_image_stabilizer_eq
            K.phi_inj_on inj_on_subset hCK hDK card_image
[PROOF STATE]
proof (prove)
using this:
card (K_repr.sumset (K.\<phi> ` C) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) + card (K_repr.sumset (K.\<phi> ` D) (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D)))) - card (K_repr.stabilizer (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))) \<le> card (K_repr.sumset (K.\<phi> ` C) (K.\<phi> ` D))
\<lbrakk>?A \<subseteq> K.Partition; ?B \<subseteq> K.Partition\<rbrakk> \<Longrightarrow> K.\<phi> ` GK.sumset ?A ?B = K_repr.sumset (K.\<phi> ` ?A) (K.\<phi> ` ?B)
?A \<subseteq> K.Partition \<Longrightarrow> K.\<phi> ` GK.stabilizer ?A = K_repr.stabilizer (K.\<phi> ` ?A)
inj_on K.\<phi> K.Partition
\<lbrakk>inj_on ?f ?A; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> inj_on ?f ?B
C \<subseteq> K.Partition
D \<subseteq> K.Partition
inj_on ?f ?A \<Longrightarrow> card (?f ` ?A) = card ?A

goal (1 subgoal):
 1. card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)
[PROOF STEP]
by (smt (z3) GK.stabilizer_subset_group GK.sumset_subset_carrier)
[PROOF STATE]
proof (state)
this:
card (GK.sumset C (GK.stabilizer (GK.sumset C D))) + card (GK.sumset D (GK.stabilizer (GK.sumset C D))) - card (GK.stabilizer (GK.sumset C D)) \<le> card (GK.sumset C D)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?m < n \<longrightarrow> ?C \<subseteq> K.Partition \<longrightarrow> ?D \<subseteq> K.Partition \<longrightarrow> finite ?C \<longrightarrow> finite ?D \<longrightarrow> ?C \<noteq> {} \<longrightarrow> ?D \<noteq> {} \<longrightarrow> card (GK.sumset ?C ?D) + card ?C = ?m \<longrightarrow> card (GK.sumset ?C (GK.stabilizer (GK.sumset ?C ?D))) + card (GK.sumset ?D (GK.stabilizer (GK.sumset ?C ?D))) - card (GK.stabilizer (GK.sumset ?C ?D)) \<le> card (GK.sumset ?C ?D)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hstab0: "GK.stabilizer (?\<phi> ` (G.sumset A B)) = {K.Class [\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.stabilizer (K.Class ` G.sumset A B) = {K.Class [\<zero>]}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. GK.stabilizer (K.Class ` G.sumset A B) \<subseteq> {K.Class [\<zero>]}
 2. {K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)
[PROOF STEP]
show "GK.stabilizer (?\<phi> ` G.sumset A B) \<subseteq> {K.Class [\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.stabilizer (K.Class ` G.sumset A B) \<subseteq> {K.Class [\<zero>]}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
assume hx: "x \<in> GK.stabilizer (?\<phi> ` G.sumset A B)"
[PROOF STATE]
proof (state)
this:
x \<in> GK.stabilizer (K.Class ` G.sumset A B)

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x \<in> GK.stabilizer (K.Class ` G.sumset A B)

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
have "?\<phi> ` G.sumset A B \<subseteq> K.Partition"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K.Class ` G.sumset A B \<subseteq> K.Partition
[PROOF STEP]
using K.natural.map_closed G.sumset_subset_carrier
[PROOF STATE]
proof (prove)
using this:
?a \<in> G \<Longrightarrow> K.Class ?a \<in> K.Partition
G.sumset ?A ?B \<subseteq> G

goal (1 subgoal):
 1. K.Class ` G.sumset A B \<subseteq> K.Partition
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
K.Class ` G.sumset A B \<subseteq> K.Partition

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x \<in> GK.stabilizer (K.Class ` G.sumset A B)
K.Class ` G.sumset A B \<subseteq> K.Partition
[PROOF STEP]
have hsum: "GK.sumset {x} (?\<phi> ` G.sumset A B) = ?\<phi> ` G.sumset A B"
[PROOF STATE]
proof (prove)
using this:
x \<in> GK.stabilizer (K.Class ` G.sumset A B)
K.Class ` G.sumset A B \<subseteq> K.Partition

goal (1 subgoal):
 1. GK.sumset {x} (K.Class ` G.sumset A B) = K.Class ` G.sumset A B
[PROOF STEP]
using GK.stabilizer_def
[PROOF STATE]
proof (prove)
using this:
x \<in> GK.stabilizer (K.Class ` G.sumset A B)
K.Class ` G.sumset A B \<subseteq> K.Partition
GK.stabilizer ?S \<equiv> {x \<in> K.Partition. GK.sumset {x} (?S \<inter> K.Partition) = ?S \<inter> K.Partition}

goal (1 subgoal):
 1. GK.sumset {x} (K.Class ` G.sumset A B) = K.Class ` G.sumset A B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
GK.sumset {x} (K.Class ` G.sumset A B) = K.Class ` G.sumset A B

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
obtain x' where hx\<phi>: "x = ?\<phi> x'" and hx'G: "x' \<in> G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x'. \<lbrakk>x = K.Class x'; x' \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hx GK.stabilizer_subset_group K.representant_exists
[PROOF STATE]
proof (prove)
using this:
x \<in> GK.stabilizer (K.Class ` G.sumset A B)
GK.stabilizer ?S \<subseteq> K.Partition
?A \<in> K.Partition \<Longrightarrow> \<exists>a\<in>G. a \<in> ?A \<and> ?A = K.Class a

goal (1 subgoal):
 1. (\<And>x'. \<lbrakk>x = K.Class x'; x' \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
x = K.Class x'
x' \<in> G

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
have hsumset: "GK.sumset {x} (?\<phi> ` G.sumset A B) = (\<lambda> a. ?\<phi> (x' [\<oplus>] a)) ` G.sumset A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.sumset {x} (K.Class ` G.sumset A B) = (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. GK.sumset {x} (K.Class ` G.sumset A B) \<subseteq> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
 2. (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<subseteq> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
show "GK.sumset {x} (?\<phi> ` G.sumset A B) \<subseteq> (\<lambda>a. ?\<phi> (x' [\<oplus>] a)) ` G.sumset A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.sumset {x} (K.Class ` G.sumset A B) \<subseteq> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> GK.sumset {x} (K.Class ` G.sumset A B) \<Longrightarrow> xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> GK.sumset {x} (K.Class ` G.sumset A B) \<Longrightarrow> xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
assume "y \<in> GK.sumset {x} (?\<phi> ` G.sumset A B)"
[PROOF STATE]
proof (state)
this:
y \<in> GK.sumset {x} (K.Class ` G.sumset A B)

goal (1 subgoal):
 1. \<And>xa. xa \<in> GK.sumset {x} (K.Class ` G.sumset A B) \<Longrightarrow> xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
obtain z where "z \<in> G.sumset A B" and "y = K.quotient_composition (?\<phi> x') (?\<phi> z)"
[PROOF STATE]
proof (prove)
using this:
y \<in> GK.sumset {x} (K.Class ` G.sumset A B)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> G.sumset A B; y = K.quotient_composition (K.Class x') (K.Class z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using GK.sumset.cases hx\<phi>
[PROOF STATE]
proof (prove)
using this:
y \<in> GK.sumset {x} (K.Class ` G.sumset A B)
\<lbrakk>?a \<in> GK.sumset ?A ?B; \<And>a b. \<lbrakk>?a = K.quotient_composition a b; a \<in> ?A; a \<in> K.Partition; b \<in> ?B; b \<in> K.Partition\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
x = K.Class x'

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> G.sumset A B; y = K.quotient_composition (K.Class x') (K.Class z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z \<in> G.sumset A B
y = K.quotient_composition (K.Class x') (K.Class z)

goal (1 subgoal):
 1. \<And>xa. xa \<in> GK.sumset {x} (K.Class ` G.sumset A B) \<Longrightarrow> xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> G.sumset A B
y = K.quotient_composition (K.Class x') (K.Class z)
[PROOF STEP]
show "y \<in> (\<lambda>a. ?\<phi> (x' [\<oplus>] a)) ` G.sumset A B"
[PROOF STATE]
proof (prove)
using this:
z \<in> G.sumset A B
y = K.quotient_composition (K.Class x') (K.Class z)

goal (1 subgoal):
 1. y \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
using K.Class_commutes_with_composition G.composition_closed hx'G G.sumset.cases
                    imageI
[PROOF STATE]
proof (prove)
using this:
z \<in> G.sumset A B
y = K.quotient_composition (K.Class x') (K.Class z)
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> K.quotient_composition (K.Class ?a) (K.Class ?b) = K.Class (?a [\<oplus>] ?b)
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> ?a [\<oplus>] ?b \<in> G
x' \<in> G
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
?x \<in> ?A \<Longrightarrow> ?f ?x \<in> ?f ` ?A

goal (1 subgoal):
 1. y \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
y \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GK.sumset {x} (K.Class ` G.sumset A B) \<subseteq> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B

goal (1 subgoal):
 1. (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<subseteq> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<subseteq> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
show "(\<lambda>a. ?\<phi> (x' [\<oplus>] a)) ` G.sumset A B \<subseteq> GK.sumset {x} (?\<phi> ` G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<subseteq> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<Longrightarrow> xa \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<Longrightarrow> xa \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
assume "y \<in> (\<lambda>a. ?\<phi> (x' [\<oplus>] a)) ` G.sumset A B"
[PROOF STATE]
proof (state)
this:
y \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<Longrightarrow> xa \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B
[PROOF STEP]
obtain z where hz: "z \<in> G.sumset A B" and "y = ?\<phi> (x' [\<oplus>] z)"
[PROOF STATE]
proof (prove)
using this:
y \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> G.sumset A B; y = K.Class (x' [\<oplus>] z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z \<in> G.sumset A B
y = K.Class (x' [\<oplus>] z)

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<Longrightarrow> xa \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> G.sumset A B
y = K.Class (x' [\<oplus>] z)
[PROOF STEP]
have "y = K.quotient_composition (?\<phi> x') (?\<phi> z)"
[PROOF STATE]
proof (prove)
using this:
z \<in> G.sumset A B
y = K.Class (x' [\<oplus>] z)

goal (1 subgoal):
 1. y = K.quotient_composition (K.Class x') (K.Class z)
[PROOF STEP]
using
                    K.Class_commutes_with_composition G.composition_closed hx'G G.sumset.cases
[PROOF STATE]
proof (prove)
using this:
z \<in> G.sumset A B
y = K.Class (x' [\<oplus>] z)
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> K.quotient_composition (K.Class ?a) (K.Class ?b) = K.Class (?a [\<oplus>] ?b)
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> ?a [\<oplus>] ?b \<in> G
x' \<in> G
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. y = K.quotient_composition (K.Class x') (K.Class z)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
y = K.quotient_composition (K.Class x') (K.Class z)

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<Longrightarrow> xa \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y = K.quotient_composition (K.Class x') (K.Class z)
[PROOF STEP]
show "y \<in> GK.sumset {x} (?\<phi> ` G.sumset A B)"
[PROOF STATE]
proof (prove)
using this:
y = K.quotient_composition (K.Class x') (K.Class z)

goal (1 subgoal):
 1. y \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
using hx\<phi> hz imageI hx GK.sumset.sumsetI K.natural.map_closed
[PROOF STATE]
proof (prove)
using this:
y = K.quotient_composition (K.Class x') (K.Class z)
x = K.Class x'
z \<in> G.sumset A B
?x \<in> ?A \<Longrightarrow> ?f ?x \<in> ?f ` ?A
x \<in> GK.stabilizer (K.Class ` G.sumset A B)
\<lbrakk>?a \<in> ?A; ?a \<in> K.Partition; ?b \<in> ?B; ?b \<in> K.Partition\<rbrakk> \<Longrightarrow> K.quotient_composition ?a ?b \<in> GK.sumset ?A ?B
?a \<in> G \<Longrightarrow> K.Class ?a \<in> K.Partition

goal (1 subgoal):
 1. y \<in> GK.sumset {x} (K.Class ` G.sumset A B)
[PROOF STEP]
by (metis G.composition_closed hx'G insertCI G.sumset.cases)
[PROOF STATE]
proof (state)
this:
y \<in> GK.sumset {x} (K.Class ` G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B \<subseteq> GK.sumset {x} (K.Class ` G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GK.sumset {x} (K.Class ` G.sumset A B) = (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
have "G.sumset {x'} (G.sumset A B) \<subseteq> G.sumset (G.sumset A B) ?K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset {x'} (G.sumset A B) \<subseteq> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
assume "y \<in> G.sumset {x'} (G.sumset A B)"
[PROOF STATE]
proof (state)
this:
y \<in> G.sumset {x'} (G.sumset A B)

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> G.sumset {x'} (G.sumset A B)
[PROOF STEP]
obtain z where hz: "z \<in> G.sumset A B" and hy: "y = x' [\<oplus>] z"
[PROOF STATE]
proof (prove)
using this:
y \<in> G.sumset {x'} (G.sumset A B)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> G.sumset A B; y = x' [\<oplus>] z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.sumset.cases
[PROOF STATE]
proof (prove)
using this:
y \<in> G.sumset {x'} (G.sumset A B)
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> G.sumset A B; y = x' [\<oplus>] z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z \<in> G.sumset A B
y = x' [\<oplus>] z

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> G.sumset A B
y = x' [\<oplus>] z
[PROOF STEP]
have "?\<phi> (x' [\<oplus>] z) \<in> ?\<phi> ` G.sumset A B"
[PROOF STATE]
proof (prove)
using this:
z \<in> G.sumset A B
y = x' [\<oplus>] z

goal (1 subgoal):
 1. K.Class (x' [\<oplus>] z) \<in> K.Class ` G.sumset A B
[PROOF STEP]
using hsum hsumset
[PROOF STATE]
proof (prove)
using this:
z \<in> G.sumset A B
y = x' [\<oplus>] z
GK.sumset {x} (K.Class ` G.sumset A B) = K.Class ` G.sumset A B
GK.sumset {x} (K.Class ` G.sumset A B) = (\<lambda>a. K.Class (x' [\<oplus>] a)) ` G.sumset A B

goal (1 subgoal):
 1. K.Class (x' [\<oplus>] z) \<in> K.Class ` G.sumset A B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
K.Class (x' [\<oplus>] z) \<in> K.Class ` G.sumset A B

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
K.Class (x' [\<oplus>] z) \<in> K.Class ` G.sumset A B
[PROOF STEP]
obtain w where hw: "{w} \<subseteq> G.sumset A B" and "w \<in> G.sumset A B"
                and "?\<phi> (x' [\<oplus>] z) = ?\<phi> w"
[PROOF STATE]
proof (prove)
using this:
K.Class (x' [\<oplus>] z) \<in> K.Class ` G.sumset A B

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>{w} \<subseteq> G.sumset A B; w \<in> G.sumset A B; K.Class (x' [\<oplus>] z) = K.Class w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{w} \<subseteq> G.sumset A B
w \<in> G.sumset A B
K.Class (x' [\<oplus>] z) = K.Class w

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{w} \<subseteq> G.sumset A B
w \<in> G.sumset A B
K.Class (x' [\<oplus>] z) = K.Class w
[PROOF STEP]
have "(x' [\<oplus>] z) \<in> G.differenceset (G.sumset {w} ?K) ?K"
[PROOF STATE]
proof (prove)
using this:
{w} \<subseteq> G.sumset A B
w \<in> G.sumset A B
K.Class (x' [\<oplus>] z) = K.Class w

goal (1 subgoal):
 1. x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))
[PROOF STEP]
using h\<phi> G.sumset_subset_carrier hx'G hz G.sumset_eq_subset_differenceset
                  G.composition_closed G.stabilizer_is_nonempty G.stabilizer_subset_group G.sumset.cases
                   K.Class_self G.differenceset_stabilizer_eq G.sumset_assoc
[PROOF STATE]
proof (prove)
using this:
{w} \<subseteq> G.sumset A B
w \<in> G.sumset A B
K.Class (x' [\<oplus>] z) = K.Class w
?a \<in> G \<Longrightarrow> K.Class ?a = G.sumset {?a} (G.stabilizer (G.sumset A B))
G.sumset ?A ?B \<subseteq> G
x' \<in> G
z \<in> G.sumset A B
\<lbrakk>?K \<subseteq> G; ?K \<noteq> {}; ?A \<subseteq> G; G.sumset ?A ?K = G.sumset ?B ?K\<rbrakk> \<Longrightarrow> ?A \<subseteq> G.differenceset (G.sumset ?B ?K) ?K
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> ?a [\<oplus>] ?b \<in> G
G.stabilizer ?S \<noteq> {}
G.stabilizer ?S \<subseteq> G
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
?a \<in> G \<Longrightarrow> ?a \<in> K.Class ?a
G.differenceset (G.stabilizer ?A) (G.stabilizer ?A) = G.stabilizer ?A
G.sumset (G.sumset ?A ?B) ?C = G.sumset ?A (G.sumset ?B ?C)

goal (1 subgoal):
 1. x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
have "G.differenceset (G.sumset {w} ?K) ?K \<subseteq> G.sumset {w} ?K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B)) \<subseteq> G.sumset {w} (G.stabilizer (G.sumset A B))
[PROOF STEP]
using hw
[PROOF STATE]
proof (prove)
using this:
{w} \<subseteq> G.sumset A B

goal (1 subgoal):
 1. G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B)) \<subseteq> G.sumset {w} (G.stabilizer (G.sumset A B))
[PROOF STEP]
by (simp add: G.differenceset_stabilizer_eq G.sumset_assoc)
[PROOF STATE]
proof (state)
this:
G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B)) \<subseteq> G.sumset {w} (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. \<And>x. x \<in> G.sumset {x'} (G.sumset A B) \<Longrightarrow> x \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))
G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B)) \<subseteq> G.sumset {w} (G.stabilizer (G.sumset A B))
[PROOF STEP]
show "y \<in> G.sumset (G.sumset A B) ?K"
[PROOF STATE]
proof (prove)
using this:
x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))
G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B)) \<subseteq> G.sumset {w} (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. y \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
using hy hw G.sumset_mono subsetD
                subset_refl
[PROOF STATE]
proof (prove)
using this:
x' [\<oplus>] z \<in> G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B))
G.differenceset (G.sumset {w} (G.stabilizer (G.sumset A B))) (G.stabilizer (G.sumset A B)) \<subseteq> G.sumset {w} (G.stabilizer (G.sumset A B))
y = x' [\<oplus>] z
{w} \<subseteq> G.sumset A B
\<lbrakk>?A' \<subseteq> ?A; ?B' \<subseteq> ?B\<rbrakk> \<Longrightarrow> G.sumset ?A' ?B' \<subseteq> G.sumset ?A ?B
\<lbrakk>?A \<subseteq> ?B; ?c \<in> ?A\<rbrakk> \<Longrightarrow> ?c \<in> ?B
?A \<subseteq> ?A

goal (1 subgoal):
 1. y \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
G.sumset {x'} (G.sumset A B) \<subseteq> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G.sumset {x'} (G.sumset A B) \<subseteq> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
have "G.sumset (G.sumset A B) ?K = G.sumset A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B)) = G.sumset A B
[PROOF STEP]
using G.sumset_commute G.sumset_stabilizer_eq_self G.sumset_subset_carrier
[PROOF STATE]
proof (prove)
using this:
G.sumset ?A ?B = G.sumset ?B ?A
?A \<subseteq> G \<Longrightarrow> G.sumset (G.stabilizer ?A) ?A = ?A
G.sumset ?A ?B \<subseteq> G

goal (1 subgoal):
 1. G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B)) = G.sumset A B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B)) = G.sumset A B

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G.sumset {x'} (G.sumset A B) \<subseteq> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B)) = G.sumset A B
[PROOF STEP]
have "G.sumset {x'} (G.sumset A B) = G.sumset A B"
[PROOF STATE]
proof (prove)
using this:
G.sumset {x'} (G.sumset A B) \<subseteq> G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B))
G.sumset (G.sumset A B) (G.stabilizer (G.sumset A B)) = G.sumset A B

goal (1 subgoal):
 1. G.sumset {x'} (G.sumset A B) = G.sumset A B
[PROOF STEP]
by (metis G.finite_sumset G.sumset_subset_carrier card_subset_eq
                G.card_sumset_singleton_subset_eq hA hB hx'G)
[PROOF STATE]
proof (state)
this:
G.sumset {x'} (G.sumset A B) = G.sumset A B

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
G.sumset {x'} (G.sumset A B) = G.sumset A B
[PROOF STEP]
have "x' \<in> ?K"
[PROOF STATE]
proof (prove)
using this:
G.sumset {x'} (G.sumset A B) = G.sumset A B

goal (1 subgoal):
 1. x' \<in> G.stabilizer (G.sumset A B)
[PROOF STEP]
using hx'G
[PROOF STATE]
proof (prove)
using this:
G.sumset {x'} (G.sumset A B) = G.sumset A B
x' \<in> G

goal (1 subgoal):
 1. x' \<in> G.stabilizer (G.sumset A B)
[PROOF STEP]
by (meson empty_subsetI G.finite_sumset hA hB insert_subset
              G.sumset_eq_sub_stabilizer G.sumset_subset_carrier)
[PROOF STATE]
proof (state)
this:
x' \<in> G.stabilizer (G.sumset A B)

goal (1 subgoal):
 1. \<And>x. x \<in> GK.stabilizer (K.Class ` G.sumset A B) \<Longrightarrow> x \<in> {K.Class [\<zero>]}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x' \<in> G.stabilizer (G.sumset A B)
[PROOF STEP]
show "x \<in> {K.Class [\<zero>]}"
[PROOF STATE]
proof (prove)
using this:
x' \<in> G.stabilizer (G.sumset A B)

goal (1 subgoal):
 1. x \<in> {K.Class [\<zero>]}
[PROOF STEP]
using hx\<phi>
[PROOF STATE]
proof (prove)
using this:
x' \<in> G.stabilizer (G.sumset A B)
x = K.Class x'

goal (1 subgoal):
 1. x \<in> {K.Class [\<zero>]}
[PROOF STEP]
by (metis K.Block_self K.Normal_def K.quotient.unit_closed insertCI)
[PROOF STATE]
proof (state)
this:
x \<in> {K.Class [\<zero>]}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GK.stabilizer (K.Class ` G.sumset A B) \<subseteq> {K.Class [\<zero>]}

goal (1 subgoal):
 1. {K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)
[PROOF STEP]
show "{K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)
[PROOF STEP]
using GK.zero_mem_stabilizer
[PROOF STATE]
proof (prove)
using this:
K.Class [\<zero>] \<in> GK.stabilizer ?A

goal (1 subgoal):
 1. {K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{K.Class [\<zero>]} \<subseteq> GK.stabilizer (K.Class ` G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GK.stabilizer (K.Class ` G.sumset A B) = {K.Class [\<zero>]}

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
interpret group_epimorphism ?\<phi> G "([\<oplus>])" "[\<zero>]" "G.Factor_Group G ?K"
          K.quotient_composition "K.Class [\<zero>]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. group_epimorphism K.Class G ([\<oplus>]) [\<zero>] K.Partition K.quotient_composition (K.Class [\<zero>])
[PROOF STEP]
..
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
interpret GKN: normal_subgroup_in_kernel K.Class G "([\<oplus>])" "[\<zero>]" "G.Factor_Group G ?K"
          K.quotient_composition "K.Class [\<zero>]" ?K
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normal_subgroup_in_kernel K.Class G ([\<oplus>]) [\<zero>] K.Partition K.quotient_composition (K.Class [\<zero>]) (G.stabilizer (G.sumset A B))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<subseteq> Ker
[PROOF STEP]
show "?K \<subseteq> Ker"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<subseteq> Ker
[PROOF STEP]
using K.Block_self K.Normal_def K.quotient.unit_closed
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> ?A; ?A \<in> K.Partition\<rbrakk> \<Longrightarrow> K.Class ?a = ?A
G.stabilizer (G.sumset A B) = K.Class [\<zero>]
K.Class [\<zero>] \<in> K.Partition

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<subseteq> Ker
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
G.stabilizer (G.sumset A B) \<subseteq> Ker

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hsumK: "card (G.sumset A B) = card ?K * card (?\<phi> ` (G.sumset A B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A B) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` G.sumset A B)
[PROOF STEP]
using G.finite_sumset hA hB G.sumset_subset_carrier G.Union_stabilizer_Class_eq
          G.sumset_subset_carrier K.Union_Coset_card_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?A; finite ?B\<rbrakk> \<Longrightarrow> finite (G.sumset ?A ?B)
finite A
finite B
G.sumset ?A ?B \<subseteq> G
?A \<subseteq> G \<Longrightarrow> ?A = \<Union> (equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?A) G ([\<oplus>]) [\<zero>]) ` ?A)
G.sumset ?A ?B \<subseteq> G
\<lbrakk>?S \<subseteq> G; \<Union> (K.Class ` ?S) = ?S\<rbrakk> \<Longrightarrow> card ?S = card (G.stabilizer (G.sumset A B)) * card (K.Class ` ?S)

goal (1 subgoal):
 1. card (G.sumset A B) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` G.sumset A B)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (G.sumset A B) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` G.sumset A B)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hGKsumset: "GK.sumset (?\<phi> ` A) (?\<phi> ` B) = ?\<phi> ` (G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.sumset (K.Class ` A) (K.Class ` B) = K.Class ` G.sumset A B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. GK.sumset (K.Class ` A) (K.Class ` B) \<subseteq> K.Class ` G.sumset A B
 2. K.Class ` G.sumset A B \<subseteq> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
show "GK.sumset (?\<phi> ` A) (?\<phi> ` B) \<subseteq> ?\<phi>  ` G.sumset A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.sumset (K.Class ` A) (K.Class ` B) \<subseteq> K.Class ` G.sumset A B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> GK.sumset (K.Class ` A) (K.Class ` B) \<Longrightarrow> x \<in> K.Class ` G.sumset A B
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> GK.sumset (K.Class ` A) (K.Class ` B) \<Longrightarrow> x \<in> K.Class ` G.sumset A B
[PROOF STEP]
assume "x \<in> GK.sumset (?\<phi> ` A) (?\<phi> ` B)"
[PROOF STATE]
proof (state)
this:
x \<in> GK.sumset (K.Class ` A) (K.Class ` B)

goal (1 subgoal):
 1. \<And>x. x \<in> GK.sumset (K.Class ` A) (K.Class ` B) \<Longrightarrow> x \<in> K.Class ` G.sumset A B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
obtain a b where ha: "a \<in> A" and hb: "b \<in> B" and
              "x = K.quotient_composition (?\<phi> a) (?\<phi> b)"
[PROOF STATE]
proof (prove)
using this:
x \<in> GK.sumset (K.Class ` A) (K.Class ` B)

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a \<in> A; b \<in> B; x = K.quotient_composition (K.Class a) (K.Class b)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using GK.sumset.cases
[PROOF STATE]
proof (prove)
using this:
x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
\<lbrakk>?a \<in> GK.sumset ?A ?B; \<And>a b. \<lbrakk>?a = K.quotient_composition a b; a \<in> ?A; a \<in> K.Partition; b \<in> ?B; b \<in> K.Partition\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a \<in> A; b \<in> B; x = K.quotient_composition (K.Class a) (K.Class b)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> A
b \<in> B
x = K.quotient_composition (K.Class a) (K.Class b)

goal (1 subgoal):
 1. \<And>x. x \<in> GK.sumset (K.Class ` A) (K.Class ` B) \<Longrightarrow> x \<in> K.Class ` G.sumset A B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
b \<in> B
x = K.quotient_composition (K.Class a) (K.Class b)
[PROOF STEP]
have "x = ?\<phi> (a [\<oplus>] b)"
[PROOF STATE]
proof (prove)
using this:
a \<in> A
b \<in> B
x = K.quotient_composition (K.Class a) (K.Class b)

goal (1 subgoal):
 1. x = K.Class (a [\<oplus>] b)
[PROOF STEP]
by (meson K.Class_commutes_with_composition hAG hBG in_mono)
[PROOF STATE]
proof (state)
this:
x = K.Class (a [\<oplus>] b)

goal (1 subgoal):
 1. \<And>x. x \<in> GK.sumset (K.Class ` A) (K.Class ` B) \<Longrightarrow> x \<in> K.Class ` G.sumset A B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = K.Class (a [\<oplus>] b)
[PROOF STEP]
show "x \<in> ?\<phi> ` G.sumset A B"
[PROOF STATE]
proof (prove)
using this:
x = K.Class (a [\<oplus>] b)

goal (1 subgoal):
 1. x \<in> K.Class ` G.sumset A B
[PROOF STEP]
using ha hb hAG hBG
[PROOF STATE]
proof (prove)
using this:
x = K.Class (a [\<oplus>] b)
a \<in> A
b \<in> B
A \<subseteq> G
B \<subseteq> G

goal (1 subgoal):
 1. x \<in> K.Class ` G.sumset A B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> K.Class ` G.sumset A B

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GK.sumset (K.Class ` A) (K.Class ` B) \<subseteq> K.Class ` G.sumset A B

goal (1 subgoal):
 1. K.Class ` G.sumset A B \<subseteq> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. K.Class ` G.sumset A B \<subseteq> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
show "?\<phi>  ` G.sumset A B \<subseteq> GK.sumset (?\<phi> ` A) (?\<phi> ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K.Class ` G.sumset A B \<subseteq> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` G.sumset A B \<Longrightarrow> x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` G.sumset A B \<Longrightarrow> x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
assume "x \<in> ?\<phi> ` G.sumset A B"
[PROOF STATE]
proof (state)
this:
x \<in> K.Class ` G.sumset A B

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` G.sumset A B \<Longrightarrow> x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> K.Class ` G.sumset A B
[PROOF STEP]
obtain c where "c \<in> G.sumset A B" and "x = ?\<phi> c"
[PROOF STATE]
proof (prove)
using this:
x \<in> K.Class ` G.sumset A B

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>c \<in> G.sumset A B; x = K.Class c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
c \<in> G.sumset A B
x = K.Class c

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` G.sumset A B \<Longrightarrow> x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c \<in> G.sumset A B
x = K.Class c
[PROOF STEP]
obtain a b where "a \<in> A" and "b \<in> B" and "x = ?\<phi> (a [\<oplus>] b)"
[PROOF STATE]
proof (prove)
using this:
c \<in> G.sumset A B
x = K.Class c

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a \<in> A; b \<in> B; x = K.Class (a [\<oplus>] b)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.sumset.cases
[PROOF STATE]
proof (prove)
using this:
c \<in> G.sumset A B
x = K.Class c
\<lbrakk>?a \<in> G.sumset ?A ?B; \<And>a b. \<lbrakk>?a = a [\<oplus>] b; a \<in> ?A; a \<in> G; b \<in> ?B; b \<in> G\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a \<in> A; b \<in> B; x = K.Class (a [\<oplus>] b)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
a \<in> A
b \<in> B
x = K.Class (a [\<oplus>] b)

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` G.sumset A B \<Longrightarrow> x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
b \<in> B
x = K.Class (a [\<oplus>] b)
[PROOF STEP]
show "x \<in> GK.sumset (?\<phi> ` A) (?\<phi> ` B)"
[PROOF STATE]
proof (prove)
using this:
a \<in> A
b \<in> B
x = K.Class (a [\<oplus>] b)

goal (1 subgoal):
 1. x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
using GK.sumset.cases
              K.Class_commutes_with_composition hAG hBG in_mono
[PROOF STATE]
proof (prove)
using this:
a \<in> A
b \<in> B
x = K.Class (a [\<oplus>] b)
\<lbrakk>?a \<in> GK.sumset ?A ?B; \<And>a b. \<lbrakk>?a = K.quotient_composition a b; a \<in> ?A; a \<in> K.Partition; b \<in> ?B; b \<in> K.Partition\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
\<lbrakk>?a \<in> G; ?b \<in> G\<rbrakk> \<Longrightarrow> K.quotient_composition (K.Class ?a) (K.Class ?b) = K.Class (?a [\<oplus>] ?b)
A \<subseteq> G
B \<subseteq> G
?A \<subseteq> ?B \<Longrightarrow> ?x \<in> ?A \<longrightarrow> ?x \<in> ?B

goal (1 subgoal):
 1. x \<in> GK.sumset (K.Class ` A) (K.Class ` B)
[PROOF STEP]
by (smt (verit, best) GK.sumset.simps K.natural.map_closed imageI)
[PROOF STATE]
proof (state)
this:
x \<in> GK.sumset (K.Class ` A) (K.Class ` B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
K.Class ` G.sumset A B \<subseteq> GK.sumset (K.Class ` A) (K.Class ` B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GK.sumset (K.Class ` A) (K.Class ` B) = K.Class ` G.sumset A B

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hAK: "card (G.sumset A ?K) = card ?K * card (?\<phi> ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` A)
[PROOF STEP]
using hAG K.Union_Coset_card_eq hA
          G.sumset_stabilizer_eq_Class_Union G.Class_image_sumset_stabilizer_eq
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> G
\<lbrakk>?S \<subseteq> G; \<Union> (K.Class ` ?S) = ?S\<rbrakk> \<Longrightarrow> card ?S = card (G.stabilizer (G.sumset A B)) * card (K.Class ` ?S)
finite A
?A \<subseteq> G \<Longrightarrow> G.sumset ?A (G.stabilizer ?B) = \<Union> (equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?B) G ([\<oplus>]) [\<zero>]) ` ?A)
?A \<subseteq> G \<Longrightarrow> equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?B) G ([\<oplus>]) [\<zero>]) ` G.sumset ?A (G.stabilizer ?B) = equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?B) G ([\<oplus>]) [\<zero>]) ` ?A

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` A)
[PROOF STEP]
by (smt (verit, ccfv_threshold) card_0_eq G.card_sumset_0_iff G.finite_sumset hAne hB hBG hBne
            G.stabilizer_finite G.sumset_subset_carrier)
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` A)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have hBK: "card (G.sumset B ?K) = card ?K * card (?\<phi> ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` B)
[PROOF STEP]
using hBG K.Union_Coset_card_eq hB
          G.sumset_stabilizer_eq_Class_Union  G.Class_image_sumset_stabilizer_eq
[PROOF STATE]
proof (prove)
using this:
B \<subseteq> G
\<lbrakk>?S \<subseteq> G; \<Union> (K.Class ` ?S) = ?S\<rbrakk> \<Longrightarrow> card ?S = card (G.stabilizer (G.sumset A B)) * card (K.Class ` ?S)
finite B
?A \<subseteq> G \<Longrightarrow> G.sumset ?A (G.stabilizer ?B) = \<Union> (equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?B) G ([\<oplus>]) [\<zero>]) ` ?A)
?A \<subseteq> G \<Longrightarrow> equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?B) G ([\<oplus>]) [\<zero>]) ` G.sumset ?A (G.stabilizer ?B) = equivalence.Class G (normal_subgroup.Congruence (G.stabilizer ?B) G ([\<oplus>]) [\<zero>]) ` ?A

goal (1 subgoal):
 1. card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` B)
[PROOF STEP]
by (smt (verit, ccfv_SIG) card_0_eq G.card_sumset_0_iff G.finite_sumset hA hAG hAne hBne
            G.stabilizer_finite G.sumset_subset_carrier)
[PROOF STATE]
proof (state)
this:
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` B)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "card (?\<phi> ` A) \<le> card A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (K.Class ` A) \<le> card A
[PROOF STEP]
by (simp add: card_image_le hA)
[PROOF STATE]
proof (state)
this:
card (K.Class ` A) \<le> card A

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card (K.Class ` A) \<le> card A

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "card (?\<phi> ` (G.sumset A B)) < card (G.sumset A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (K.Class ` G.sumset A B) < card (G.sumset A B)
[PROOF STEP]
using hsumK hcardK_gt_1
          G.card_sumset_0_iff hA hB hAne hBne
[PROOF STATE]
proof (prove)
using this:
card (G.sumset A B) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` G.sumset A B)
1 < card (G.stabilizer (G.sumset A B))
\<lbrakk>?A \<subseteq> G; ?B \<subseteq> G\<rbrakk> \<Longrightarrow> (card (G.sumset ?A ?B) = 0) = (card ?A = 0 \<or> card ?B = 0)
finite A
finite B
A \<noteq> {}
B \<noteq> {}

goal (1 subgoal):
 1. card (K.Class ` G.sumset A B) < card (G.sumset A B)
[PROOF STEP]
by (metis card_eq_0_iff card_image_le hAG hBG
          le_neq_implies_less less_not_refl3 mult_cancel2 nat_mult_1)
[PROOF STATE]
proof (state)
this:
card (K.Class ` G.sumset A B) < card (G.sumset A B)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card (K.Class ` A) \<le> card A
card (K.Class ` G.sumset A B) < card (G.sumset A B)
[PROOF STEP]
have "card (GK.sumset (?\<phi> ` A) (?\<phi> ` B)) + card (?\<phi> ` A) < card (G.sumset A B) + card A"
[PROOF STATE]
proof (prove)
using this:
card (K.Class ` A) \<le> card A
card (K.Class ` G.sumset A B) < card (G.sumset A B)

goal (1 subgoal):
 1. card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) < card (G.sumset A B) + card A
[PROOF STEP]
using hGKsumset
[PROOF STATE]
proof (prove)
using this:
card (K.Class ` A) \<le> card A
card (K.Class ` G.sumset A B) < card (G.sumset A B)
GK.sumset (K.Class ` A) (K.Class ` B) = K.Class ` G.sumset A B

goal (1 subgoal):
 1. card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) < card (G.sumset A B) + card A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) < card (G.sumset A B) + card A

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) < card (G.sumset A B) + card A
[PROOF STEP]
obtain m where "m < n" and "card (GK.sumset (?\<phi> ` A) (?\<phi> ` B)) + card (?\<phi> ` A) = m"
[PROOF STATE]
proof (prove)
using this:
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) < card (G.sumset A B) + card A

goal (1 subgoal):
 1. (\<And>m. \<lbrakk>m < n; card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hcardsum
[PROOF STATE]
proof (prove)
using this:
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) < card (G.sumset A B) + card A
card (G.sumset A B) + card A = n

goal (1 subgoal):
 1. (\<And>m. \<lbrakk>m < n; card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m < n
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
m < n
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have h\<phi>Asub: "?\<phi> ` A \<subseteq> G.Factor_Group G ?K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K.Class ` A \<subseteq> K.Partition
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` A \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` A \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
assume "x \<in> ?\<phi> ` A"
[PROOF STATE]
proof (state)
this:
x \<in> K.Class ` A

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` A \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> K.Class ` A
[PROOF STEP]
obtain a where "a \<in> G" and "?\<phi> a = x"
[PROOF STATE]
proof (prove)
using this:
x \<in> K.Class ` A

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> G; K.Class a = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hAG
[PROOF STATE]
proof (prove)
using this:
x \<in> K.Class ` A
A \<subseteq> G

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> G; K.Class a = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> G
K.Class a = x

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` A \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> G
K.Class a = x
[PROOF STEP]
show "x \<in> G.Factor_Group G ?K"
[PROOF STATE]
proof (prove)
using this:
a \<in> G
K.Class a = x

goal (1 subgoal):
 1. x \<in> K.Partition
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> K.Partition

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
K.Class ` A \<subseteq> K.Partition

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
K.Class ` A \<subseteq> K.Partition

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have h\<phi>Bsub: "?\<phi> ` B \<subseteq> G.Factor_Group G ?K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K.Class ` B \<subseteq> K.Partition
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` B \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` B \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
assume "x \<in> ?\<phi> ` B"
[PROOF STATE]
proof (state)
this:
x \<in> K.Class ` B

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` B \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> K.Class ` B
[PROOF STEP]
obtain b where "b \<in> G" and "?\<phi> b = x"
[PROOF STATE]
proof (prove)
using this:
x \<in> K.Class ` B

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> G; K.Class b = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hBG
[PROOF STATE]
proof (prove)
using this:
x \<in> K.Class ` B
B \<subseteq> G

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> G; K.Class b = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
b \<in> G
K.Class b = x

goal (1 subgoal):
 1. \<And>x. x \<in> K.Class ` B \<Longrightarrow> x \<in> K.Partition
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b \<in> G
K.Class b = x
[PROOF STEP]
show "x \<in> G.Factor_Group G ?K"
[PROOF STATE]
proof (prove)
using this:
b \<in> G
K.Class b = x

goal (1 subgoal):
 1. x \<in> K.Partition
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> K.Partition

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
K.Class ` B \<subseteq> K.Partition

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
K.Class ` B \<subseteq> K.Partition

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have h\<phi>A: "finite (?\<phi> ` A)" and h\<phi>B: "finite (?\<phi> ` B)" and h\<phi>Ane: "?\<phi> ` A \<noteq> {}" and
          h\<phi>Bne: "?\<phi> ` B \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (finite (K.Class ` A) &&& finite (K.Class ` B)) &&& K.Class ` A \<noteq> {} &&& K.Class ` B \<noteq> {}
[PROOF STEP]
using hA hB hAne hBne
[PROOF STATE]
proof (prove)
using this:
finite A
finite B
A \<noteq> {}
B \<noteq> {}

goal (1 subgoal):
 1. (finite (K.Class ` A) &&& finite (K.Class ` B)) &&& K.Class ` A \<noteq> {} &&& K.Class ` B \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (K.Class ` A)
finite (K.Class ` B)
K.Class ` A \<noteq> {}
K.Class ` B \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (K.Class ` A)
finite (K.Class ` B)
K.Class ` A \<noteq> {}
K.Class ` B \<noteq> {}

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "additive_abelian_group (G.Factor_Group G ?K) K.quotient_composition
          (K.Class [\<zero>])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "GK.stabilizer (GK.sumset (?\<phi> ` A) (?\<phi> ` B)) = {K.Class [\<zero>]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)) = {K.Class [\<zero>]}
[PROOF STEP]
using hstab0 hGKsumset
[PROOF STATE]
proof (prove)
using this:
GK.stabilizer (K.Class ` G.sumset A B) = {K.Class [\<zero>]}
GK.sumset (K.Class ` A) (K.Class ` B) = K.Class ` G.sumset A B

goal (1 subgoal):
 1. GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)) = {K.Class [\<zero>]}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)) = {K.Class [\<zero>]}

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
m < n
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m
K.Class ` A \<subseteq> K.Partition
K.Class ` B \<subseteq> K.Partition
finite (K.Class ` A)
finite (K.Class ` B)
K.Class ` A \<noteq> {}
K.Class ` B \<noteq> {}
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])
GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)) = {K.Class [\<zero>]}
[PROOF STEP]
have hind\<phi>: "card (GK.sumset (?\<phi> ` A) (?\<phi> ` B)) \<ge>
          card (GK.sumset (?\<phi> ` A) {K.Class [\<zero>]}) + card (GK.sumset (?\<phi> ` B) {K.Class [\<zero>]}) - 1"
[PROOF STATE]
proof (prove)
using this:
m < n
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m
K.Class ` A \<subseteq> K.Partition
K.Class ` B \<subseteq> K.Partition
finite (K.Class ` A)
finite (K.Class ` B)
K.Class ` A \<noteq> {}
K.Class ` B \<noteq> {}
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])
GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)) = {K.Class [\<zero>]}

goal (1 subgoal):
 1. card (GK.sumset (K.Class ` A) {K.Class [\<zero>]}) + card (GK.sumset (K.Class ` B) {K.Class [\<zero>]}) - 1 \<le> card (GK.sumset (K.Class ` A) (K.Class ` B))
[PROOF STEP]
using hindfactor[of "m" "?\<phi> ` A" "?\<phi> ` B"]
[PROOF STATE]
proof (prove)
using this:
m < n
card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m
K.Class ` A \<subseteq> K.Partition
K.Class ` B \<subseteq> K.Partition
finite (K.Class ` A)
finite (K.Class ` B)
K.Class ` A \<noteq> {}
K.Class ` B \<noteq> {}
additive_abelian_group K.Partition K.quotient_composition (K.Class [\<zero>])
GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)) = {K.Class [\<zero>]}
m < n \<longrightarrow> K.Class ` A \<subseteq> K.Partition \<longrightarrow> K.Class ` B \<subseteq> K.Partition \<longrightarrow> finite (K.Class ` A) \<longrightarrow> finite (K.Class ` B) \<longrightarrow> K.Class ` A \<noteq> {} \<longrightarrow> K.Class ` B \<noteq> {} \<longrightarrow> card (GK.sumset (K.Class ` A) (K.Class ` B)) + card (K.Class ` A) = m \<longrightarrow> card (GK.sumset (K.Class ` A) (GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)))) + card (GK.sumset (K.Class ` B) (GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B)))) - card (GK.stabilizer (GK.sumset (K.Class ` A) (K.Class ` B))) \<le> card (GK.sumset (K.Class ` A) (K.Class ` B))

goal (1 subgoal):
 1. card (GK.sumset (K.Class ` A) {K.Class [\<zero>]}) + card (GK.sumset (K.Class ` B) {K.Class [\<zero>]}) - 1 \<le> card (GK.sumset (K.Class ` A) (K.Class ` B))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (GK.sumset (K.Class ` A) {K.Class [\<zero>]}) + card (GK.sumset (K.Class ` B) {K.Class [\<zero>]}) - 1 \<le> card (GK.sumset (K.Class ` A) (K.Class ` B))

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have h\<phi>sumA: "GK.sumset (?\<phi> ` A) {K.Class [\<zero>]} = ?\<phi> ` A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.sumset (K.Class ` A) {K.Class [\<zero>]} = K.Class ` A
[PROOF STEP]
by (simp add: Int_absorb1 Int_commute h\<phi>Asub)
[PROOF STATE]
proof (state)
this:
GK.sumset (K.Class ` A) {K.Class [\<zero>]} = K.Class ` A

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have  h\<phi>sumB: "GK.sumset (?\<phi> ` B) {K.Class [\<zero>]} = ?\<phi> ` B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GK.sumset (K.Class ` B) {K.Class [\<zero>]} = K.Class ` B
[PROOF STEP]
by (simp add: Int_absorb1 Int_commute h\<phi>Bsub)
[PROOF STATE]
proof (state)
this:
GK.sumset (K.Class ` B) {K.Class [\<zero>]} = K.Class ` B

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "card (G.sumset A ?K) + card (G.sumset B ?K) - card ?K =
          card ?K * (card (?\<phi> ` A) + card (?\<phi> ` B) - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) = card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1)
[PROOF STEP]
using hAK hBK add_mult_distrib2 diff_mult_distrib2 nat_mult_1_right
[PROOF STATE]
proof (prove)
using this:
card (G.sumset A (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` A)
card (G.sumset B (G.stabilizer (G.sumset A B))) = card (G.stabilizer (G.sumset A B)) * card (K.Class ` B)
?k * (?m + ?n) = ?k * ?m + ?k * ?n
?k * (?m - ?n) = ?k * ?m - ?k * ?n
?n * 1 = ?n

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) = card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1)
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) = card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) = card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1)

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
have "... \<le> card ?K * card (GK.sumset (?\<phi> ` A) (?\<phi> ` B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1) \<le> card (G.stabilizer (G.sumset A B)) * card (GK.sumset (K.Class ` A) (K.Class ` B))
[PROOF STEP]
using hind\<phi> h\<phi>sumA h\<phi>sumB
[PROOF STATE]
proof (prove)
using this:
card (GK.sumset (K.Class ` A) {K.Class [\<zero>]}) + card (GK.sumset (K.Class ` B) {K.Class [\<zero>]}) - 1 \<le> card (GK.sumset (K.Class ` A) (K.Class ` B))
GK.sumset (K.Class ` A) {K.Class [\<zero>]} = K.Class ` A
GK.sumset (K.Class ` B) {K.Class [\<zero>]} = K.Class ` B

goal (1 subgoal):
 1. card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1) \<le> card (G.stabilizer (G.sumset A B)) * card (GK.sumset (K.Class ` A) (K.Class ` B))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (G.stabilizer (G.sumset A B)) * (card (K.Class ` A) + card (K.Class ` B) - 1) \<le> card (G.stabilizer (G.sumset A B)) * card (GK.sumset (K.Class ` A) (K.Class ` B))

goal (1 subgoal):
 1. G.stabilizer (G.sumset A B) \<noteq> {[\<zero>]} \<Longrightarrow> card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.stabilizer (G.sumset A B)) * card (GK.sumset (K.Class ` A) (K.Class ` B))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.stabilizer (G.sumset A B)) * card (GK.sumset (K.Class ` A) (K.Class ` B))

goal (1 subgoal):
 1. card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)
[PROOF STEP]
by (simp add: hGKsumset hsumK)
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card (G.sumset A (G.stabilizer (G.sumset A B))) + card (G.sumset B (G.stabilizer (G.sumset A B))) - card (G.stabilizer (G.sumset A B)) \<le> card (G.sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; ?A \<subseteq> G; ?B \<subseteq> G; finite ?A; finite ?B; ?A \<noteq> {}; ?B \<noteq> {}; card (sumset ?A ?B) + card ?A = n\<rbrakk> \<Longrightarrow> card (sumset ?A (stabilizer (sumset ?A ?B))) + card (sumset ?B (stabilizer (sumset ?A ?B))) - card (stabilizer (sumset ?A ?B)) \<le> card (sumset ?A ?B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; ?A \<subseteq> G; ?B \<subseteq> G; finite ?A; finite ?B; ?A \<noteq> {}; ?B \<noteq> {}; card (sumset ?A ?B) + card ?A = ?n\<rbrakk> \<Longrightarrow> card (sumset ?A (stabilizer (sumset ?A ?B))) + card (sumset ?B (stabilizer (sumset ?A ?B))) - card (stabilizer (sumset ?A ?B)) \<le> card (sumset ?A ?B)

goal (1 subgoal):
 1. card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; ?A \<subseteq> G; ?B \<subseteq> G; finite ?A; finite ?B; ?A \<noteq> {}; ?B \<noteq> {}; card (sumset ?A ?B) + card ?A = ?n\<rbrakk> \<Longrightarrow> card (sumset ?A (stabilizer (sumset ?A ?B))) + card (sumset ?B (stabilizer (sumset ?A ?B))) - card (stabilizer (sumset ?A ?B)) \<le> card (sumset ?A ?B)

goal (1 subgoal):
 1. card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
using assms hAne hBne additive_abelian_group_axioms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>additive_abelian_group G (\<oplus>) \<zero>; ?A \<subseteq> G; ?B \<subseteq> G; finite ?A; finite ?B; ?A \<noteq> {}; ?B \<noteq> {}; card (sumset ?A ?B) + card ?A = ?n\<rbrakk> \<Longrightarrow> card (sumset ?A (stabilizer (sumset ?A ?B))) + card (sumset ?B (stabilizer (sumset ?A ?B))) - card (stabilizer (sumset ?A ?B)) \<le> card (sumset ?A ?B)
A \<subseteq> G
B \<subseteq> G
finite A
finite B
A \<noteq> {}
B \<noteq> {}
A \<noteq> {}
B \<noteq> {}
additive_abelian_group G (\<oplus>) \<zero>

goal (1 subgoal):
 1. card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
card (sumset A (stabilizer (sumset A B))) + card (sumset B (stabilizer (sumset A B))) - card (stabilizer (sumset A B)) \<le> card (sumset A B)

goal:
No subgoals!
[PROOF STEP]
qed