[STATEMENT]
lemma FinGroupRepresentation_reducible' :
  fixes n::nat
  shows "\<And>V. FinGroupRepresentation G fgsmult V
              \<and> n = FGModule.fdim fgsmult V
                \<Longrightarrow> (\<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult)
                  \<and> (0 \<notin> set Us) \<and> V = (\<Oplus>U\<leftarrow>Us. U) )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>V. FinGroupRepresentation G fgsmult V \<and> n = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V \<Longrightarrow> \<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
proof (induct n rule: full_nat_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n V. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. FinGroupRepresentation G fgsmult x \<and> m = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) x \<longrightarrow> (\<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U))); FinGroupRepresentation G fgsmult V \<and> n = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
fix n V
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n V. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. FinGroupRepresentation G fgsmult x \<and> m = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) x \<longrightarrow> (\<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U))); FinGroupRepresentation G fgsmult V \<and> n = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
define GRep IGRep GSubspace GSpan fdim
    where "GRep = FinGroupRepresentation G fgsmult"
      and "IGRep = IrrFinGroupRepresentation G fgsmult"
      and "GSubspace = FGModule.GSubspace G fgsmult V"
      and "GSpan = FGModule.GSpan G fgsmult"
      and "fdim = FGModule.fdim fgsmult"
[PROOF STATE]
proof (state)
this:
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
fdim = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult)

goal (1 subgoal):
 1. \<And>n V. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. FinGroupRepresentation G fgsmult x \<and> m = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) x \<longrightarrow> (\<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U))); FinGroupRepresentation G fgsmult V \<and> n = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
assume "\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. GRep x \<and> m = fdim x \<longrightarrow> ( \<exists>Us.
              Ball (set Us) IGRep \<and> (0 \<notin> set Us) \<and> x = (\<Oplus>U\<leftarrow>Us. U)) )"
[PROOF STATE]
proof (state)
this:
\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. GRep x \<and> m = fdim x \<longrightarrow> (\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U)))

goal (1 subgoal):
 1. \<And>n V. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. FinGroupRepresentation G fgsmult x \<and> m = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) x \<longrightarrow> (\<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U))); FinGroupRepresentation G fgsmult V \<and> n = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
hence prev_case:
    "\<And>m. m < n \<Longrightarrow> (\<And>W. GRep W \<Longrightarrow> m = fdim W \<Longrightarrow> ( \<exists>Us.
            Ball (set Us) IGRep \<and> (0 \<notin> set Us) \<and> W = (\<Oplus>U\<leftarrow>Us. U)))"
[PROOF STATE]
proof (prove)
using this:
\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. GRep x \<and> m = fdim x \<longrightarrow> (\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U)))

goal (1 subgoal):
 1. \<And>m. m < n \<Longrightarrow> (\<And>W. \<lbrakk>GRep W; m = fdim W\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> W = (\<Oplus>U\<leftarrow>Us. U))
[PROOF STEP]
using Suc_le_eq
[PROOF STATE]
proof (prove)
using this:
\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. GRep x \<and> m = fdim x \<longrightarrow> (\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U)))
(Suc ?m \<le> ?n) = (?m < ?n)

goal (1 subgoal):
 1. \<And>m. m < n \<Longrightarrow> (\<And>W. \<lbrakk>GRep W; m = fdim W\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> W = (\<Oplus>U\<leftarrow>Us. U))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>?m < n; GRep ?W; ?m = fdim ?W\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> ?W = (\<Oplus>U\<leftarrow>Us. U)

goal (1 subgoal):
 1. \<And>n V. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> (\<forall>x. FinGroupRepresentation G fgsmult x \<and> m = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) x \<longrightarrow> (\<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> x = (\<Oplus>U\<leftarrow>Us. U))); FinGroupRepresentation G fgsmult V \<and> n = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) (IrrFinGroupRepresentation G fgsmult) \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
show "GRep V \<and> n = fdim V \<Longrightarrow> ( \<exists>Us.
          Ball (set Us) IGRep \<and> (0 \<notin> set Us) \<and> V = (\<Oplus>U\<leftarrow>Us. U) )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GRep V \<and> n = fdim V \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. GRep V \<and> n = fdim V \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
assume V: "GRep V \<and> n = fdim V"
[PROOF STATE]
proof (state)
this:
GRep V \<and> n = fdim V

goal (1 subgoal):
 1. GRep V \<and> n = fdim V \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
show "(\<exists>Us. Ball (set Us) IGRep \<and> (0 \<notin> set Us) \<and> V = (\<Oplus>U\<leftarrow>Us. U))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
proof (cases "IGRep V" "V = 0" rule: conjcases)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 4. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
case BothTrue
[PROOF STATE]
proof (state)
this:
IGRep V \<and> V = 0

goal (4 subgoals):
 1. IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 4. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
IGRep V \<and> V = 0

goal (4 subgoals):
 1. IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 4. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
have "Ball (set []) IGRep" "\<forall>U\<in>set []. U \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ball (set []) IGRep &&& \<forall>U\<in>set []. U \<noteq> (0::'d)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Ball (set []) IGRep
\<forall>U\<in>set []. U \<noteq> (0::?'d1)

goal (4 subgoals):
 1. IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 4. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
IGRep V \<and> V = 0
Ball (set []) IGRep
\<forall>U\<in>set []. U \<noteq> (0::?'d1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
IGRep V \<and> V = 0
Ball (set []) IGRep
\<forall>U\<in>set []. U \<noteq> (0::?'d1)

goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
using inner_dirsum_Nil
[PROOF STATE]
proof (prove)
using this:
IGRep V \<and> V = 0
Ball (set []) IGRep
\<forall>U\<in>set []. U \<noteq> (0::?'d1)
(\<Oplus>A\<leftarrow>[]. A) = 0

goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
case OneTrue
[PROOF STATE]
proof (state)
this:
IGRep V \<and> V \<noteq> 0

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
with V GRep_def
[PROOF STATE]
proof (chain)
picking this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep V \<and> V \<noteq> 0
[PROOF STEP]
obtain v where v: "v \<in> V" "v \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep V \<and> V \<noteq> 0

goal (1 subgoal):
 1. (\<And>v. \<lbrakk>v \<in> V; v \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using FinGroupRepresentation.Group[of G fgsmult] Group.obtain_nonzero
[PROOF STATE]
proof (prove)
using this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep V \<and> V \<noteq> 0
FinGroupRepresentation G fgsmult ?V \<Longrightarrow> Group ?V
\<lbrakk>Group ?G; ?G \<noteq> 0; \<And>g. \<lbrakk>g \<in> ?G; g \<noteq> (0::?'g)\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>v. \<lbrakk>v \<in> V; v \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
v \<in> V
v \<noteq> (0::'a)

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
from v(1) V GRep_def GSpan_def GSubspace_def
[PROOF STATE]
proof (chain)
picking this:
v \<in> V
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
[PROOF STEP]
have GSub: "GSubspace (GSpan [v])"
[PROOF STATE]
proof (prove)
using this:
v \<in> V
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)

goal (1 subgoal):
 1. GSubspace (GSpan [v])
[PROOF STEP]
using FinGroupRepresentation.GSubmodule_GSpan_single
[PROOF STATE]
proof (prove)
using this:
v \<in> V
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
\<lbrakk>FinGroupRepresentation ?G ?smult ?V; ?m \<in> ?V\<rbrakk> \<Longrightarrow> RModule (aezfun_setspan ?G) ?smult (R_scalar_mult.RSpan (aezfun_setspan ?G) ?smult [?m]) \<and> R_scalar_mult.RSpan (aezfun_setspan ?G) ?smult [?m] \<subseteq> ?V

goal (1 subgoal):
 1. GSubspace (GSpan [v])
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
GSubspace (GSpan [v])

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
GSubspace (GSpan [v])

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
from v V GRep_def GSpan_def
[PROOF STATE]
proof (chain)
picking this:
v \<in> V
v \<noteq> (0::'a)
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
[PROOF STEP]
have nzero: "GSpan [v] \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
v \<in> V
v \<noteq> (0::'a)
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult

goal (1 subgoal):
 1. GSpan [v] \<noteq> 0
[PROOF STEP]
using FinGroupRepresentation.GSpan_single_nonzero
[PROOF STATE]
proof (prove)
using this:
v \<in> V
v \<noteq> (0::'a)
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
\<lbrakk>FinGroupRepresentation ?G ?smult ?V; ?m \<in> ?V; ?m \<noteq> (0::?'v)\<rbrakk> \<Longrightarrow> R_scalar_mult.RSpan (aezfun_setspan ?G) ?smult [?m] \<noteq> 0

goal (1 subgoal):
 1. GSpan [v] \<noteq> 0
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
GSpan [v] \<noteq> 0

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
GSubspace (GSpan [v])
GSpan [v] \<noteq> 0
[PROOF STEP]
have "V = GSpan [v]"
[PROOF STATE]
proof (prove)
using this:
GSubspace (GSpan [v])
GSpan [v] \<noteq> 0

goal (1 subgoal):
 1. V = GSpan [v]
[PROOF STEP]
using OneTrue GSpan_def GSubspace_def IGRep_def IrrFinGroupRepresentation.irr
[PROOF STATE]
proof (prove)
using this:
GSubspace (GSpan [v])
GSpan [v] \<noteq> 0
IGRep V \<and> V \<noteq> 0
GSpan = R_scalar_mult.RSpan (aezfun_setspan G) fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
IGRep = IrrFinGroupRepresentation G fgsmult
\<lbrakk>IrrFinGroupRepresentation ?G ?smult ?V; RModule (aezfun_setspan ?G) ?smult ?U \<and> ?U \<subseteq> ?V\<rbrakk> \<Longrightarrow> ?U = 0 \<or> ?U = ?V

goal (1 subgoal):
 1. V = GSpan [v]
[PROOF STEP]
by    fast
[PROOF STATE]
proof (state)
this:
V = GSpan [v]

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
with OneTrue
[PROOF STATE]
proof (chain)
picking this:
IGRep V \<and> V \<noteq> 0
V = GSpan [v]
[PROOF STEP]
have  "Ball (set [GSpan [v]]) IGRep" "0 \<notin> set [GSpan [v]]"
              "V = (\<Oplus>U\<leftarrow>[GSpan [v]]. U)"
[PROOF STATE]
proof (prove)
using this:
IGRep V \<and> V \<noteq> 0
V = GSpan [v]

goal (1 subgoal):
 1. Ball (set [GSpan [v]]) IGRep &&& 0 \<notin> set [GSpan [v]] &&& V = (\<Oplus>U\<leftarrow>[GSpan [v]]. U)
[PROOF STEP]
using nzero GSub inner_dirsum_singleD
[PROOF STATE]
proof (prove)
using this:
IGRep V \<and> V \<noteq> 0
V = GSpan [v]
GSpan [v] \<noteq> 0
GSubspace (GSpan [v])
(\<Oplus>N\<leftarrow>[?M]. N) = ?M

goal (1 subgoal):
 1. Ball (set [GSpan [v]]) IGRep &&& 0 \<notin> set [GSpan [v]] &&& V = (\<Oplus>U\<leftarrow>[GSpan [v]]. U)
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
Ball (set [GSpan [v]]) IGRep
0 \<notin> set [GSpan [v]]
V = (\<Oplus>U\<leftarrow>[GSpan [v]]. U)

goal (3 subgoals):
 1. IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 3. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Ball (set [GSpan [v]]) IGRep
0 \<notin> set [GSpan [v]]
V = (\<Oplus>U\<leftarrow>[GSpan [v]]. U)

goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)

goal (2 subgoals):
 1. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
case OtherTrue
[PROOF STATE]
proof (state)
this:
\<not> IGRep V \<and> V = 0

goal (2 subgoals):
 1. \<not> IGRep V \<and> V = 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
 2. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
with V GRep_def IGRep_def
[PROOF STATE]
proof (chain)
picking this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
\<not> IGRep V \<and> V = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
\<not> IGRep V \<and> V = 0

goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
using FinGroupRepresentation.IrrFinGroupRep_trivialGSubspace
[PROOF STATE]
proof (prove)
using this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
\<not> IGRep V \<and> V = 0
FinGroupRepresentation ?G ?smult ?V \<Longrightarrow> IrrFinGroupRepresentation ?G ?smult 0

goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
case BothFalse
[PROOF STATE]
proof (state)
this:
\<not> IGRep V \<and> V \<noteq> 0

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
with V GRep_def IGRep_def GSubspace_def
[PROOF STATE]
proof (chain)
picking this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
\<not> IGRep V \<and> V \<noteq> 0
[PROOF STEP]
obtain U W
        where U: "GSubspace U" "U \<noteq> 0" "U \<noteq> V"
        and   W: "GSubspace W" "W \<noteq> 0" "W \<noteq> V"
        and   Vdecompose: "V = U \<oplus> W"
[PROOF STATE]
proof (prove)
using this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
\<not> IGRep V \<and> V \<noteq> 0

goal (1 subgoal):
 1. (\<And>U W. \<lbrakk>GSubspace U; U \<noteq> 0; U \<noteq> V; GSubspace W; W \<noteq> 0; W \<noteq> V; V = U \<oplus> W\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using FinGroupRepresentation.notIrr_decompose[of G fgsmult V]
[PROOF STATE]
proof (prove)
using this:
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
IGRep = IrrFinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
\<not> IGRep V \<and> V \<noteq> 0
\<lbrakk>FinGroupRepresentation G fgsmult V; \<not> IrrFinGroupRepresentation G fgsmult V\<rbrakk> \<Longrightarrow> \<exists>U W. (RModule (aezfun_setspan G) fgsmult U \<and> U \<subseteq> V) \<and> U \<noteq> 0 \<and> U \<noteq> V \<and> (RModule (aezfun_setspan G) fgsmult W \<and> W \<subseteq> V) \<and> W \<noteq> 0 \<and> W \<noteq> V \<and> V = U \<oplus> W

goal (1 subgoal):
 1. (\<And>U W. \<lbrakk>GSubspace U; U \<noteq> 0; U \<noteq> V; GSubspace W; W \<noteq> 0; W \<noteq> V; V = U \<oplus> W\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
GSubspace U
U \<noteq> 0
U \<noteq> V
GSubspace W
W \<noteq> 0
W \<noteq> V
V = U \<oplus> W

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
from U(1,3) W(1,3) V GRep_def GSubspace_def fdim_def
[PROOF STATE]
proof (chain)
picking this:
GSubspace U
U \<noteq> V
GSubspace W
W \<noteq> V
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
fdim = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult)
[PROOF STEP]
have  "fdim U < fdim V" "fdim W < fdim V"
[PROOF STATE]
proof (prove)
using this:
GSubspace U
U \<noteq> V
GSubspace W
W \<noteq> V
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
fdim = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult)

goal (1 subgoal):
 1. fdim U < fdim V &&& fdim W < fdim V
[PROOF STEP]
using FinGroupRepresentation.axioms(1)
              FGModule.GSubspace_is_Subspace[of G fgsmult V U]
              FGModule.GSubspace_is_Subspace[of G fgsmult V W]
              FinGroupRepresentation.FinDimVectorSpace[of G fgsmult V]
              FinDimVectorSpace.Subspace_dim_lt[
                of "aezfun_scalar_mult.fsmult fgsmult" V U
              ]
              FinDimVectorSpace.Subspace_dim_lt[
                of "aezfun_scalar_mult.fsmult fgsmult" V W
              ]
[PROOF STATE]
proof (prove)
using this:
GSubspace U
U \<noteq> V
GSubspace W
W \<noteq> V
GRep V \<and> n = fdim V
GRep = FinGroupRepresentation G fgsmult
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
fdim = R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult)
FinGroupRepresentation ?G ?smult ?V \<Longrightarrow> FGModule ?G ?smult ?V
\<lbrakk>FGModule G fgsmult V; RModule (aezfun_setspan G) fgsmult U \<and> U \<subseteq> V\<rbrakk> \<Longrightarrow> RModule UNIV (aezfun_scalar_mult.fsmult fgsmult) U \<and> U \<subseteq> V
\<lbrakk>FGModule G fgsmult V; RModule (aezfun_setspan G) fgsmult W \<and> W \<subseteq> V\<rbrakk> \<Longrightarrow> RModule UNIV (aezfun_scalar_mult.fsmult fgsmult) W \<and> W \<subseteq> V
FinGroupRepresentation G fgsmult V \<Longrightarrow> FinDimVectorSpace (aezfun_scalar_mult.fsmult fgsmult) V
\<lbrakk>FinDimVectorSpace (aezfun_scalar_mult.fsmult fgsmult) V; RModule UNIV (aezfun_scalar_mult.fsmult fgsmult) U \<and> U \<subseteq> V; U \<noteq> V\<rbrakk> \<Longrightarrow> R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) U < R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V
\<lbrakk>FinDimVectorSpace (aezfun_scalar_mult.fsmult fgsmult) V; RModule UNIV (aezfun_scalar_mult.fsmult fgsmult) W \<and> W \<subseteq> V; W \<noteq> V\<rbrakk> \<Longrightarrow> R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) W < R_scalar_mult.dim_R UNIV (aezfun_scalar_mult.fsmult fgsmult) V

goal (1 subgoal):
 1. fdim U < fdim V &&& fdim W < fdim V
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
fdim U < fdim V
fdim W < fdim V

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
from this U(1) W(1) V GSubspace_def
[PROOF STATE]
proof (chain)
picking this:
fdim U < fdim V
fdim W < fdim V
GSubspace U
GSubspace W
GRep V \<and> n = fdim V
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
[PROOF STEP]
obtain Us Ws
        where "Ball (set Us) IGRep \<and> (0 \<notin> set Us) \<and> U = (\<Oplus>X\<leftarrow>Us. X)"
        and   "Ball (set Ws) IGRep \<and> (0 \<notin> set Ws) \<and> W = (\<Oplus>X\<leftarrow>Ws. X)"
[PROOF STATE]
proof (prove)
using this:
fdim U < fdim V
fdim W < fdim V
GSubspace U
GSubspace W
GRep V \<and> n = fdim V
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)

goal (1 subgoal):
 1. (\<And>Us Ws. \<lbrakk>Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> U = (\<Oplus>X\<leftarrow>Us. X); Ball (set Ws) IGRep \<and> 0 \<notin> set Ws \<and> W = (\<Oplus>X\<leftarrow>Ws. X)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prev_case[of "fdim U"] prev_case[of "fdim W"] GRep_def
              FinGroupRepresentation.GSubspace_is_FinGroupRep[
                of G fgsmult V U
              ]
              FinGroupRepresentation.GSubspace_is_FinGroupRep[
                of G fgsmult V W
              ]
[PROOF STATE]
proof (prove)
using this:
fdim U < fdim V
fdim W < fdim V
GSubspace U
GSubspace W
GRep V \<and> n = fdim V
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
\<lbrakk>fdim U < n; GRep ?W; fdim U = fdim ?W\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> ?W = (\<Oplus>U\<leftarrow>Us. U)
\<lbrakk>fdim W < n; GRep ?W; fdim W = fdim ?W\<rbrakk> \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> ?W = (\<Oplus>U\<leftarrow>Us. U)
GRep = FinGroupRepresentation G fgsmult
\<lbrakk>FinGroupRepresentation G fgsmult V; RModule (aezfun_setspan G) fgsmult U \<and> U \<subseteq> V\<rbrakk> \<Longrightarrow> FinGroupRepresentation G fgsmult U
\<lbrakk>FinGroupRepresentation G fgsmult V; RModule (aezfun_setspan G) fgsmult W \<and> W \<subseteq> V\<rbrakk> \<Longrightarrow> FinGroupRepresentation G fgsmult W

goal (1 subgoal):
 1. (\<And>Us Ws. \<lbrakk>Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> U = (\<Oplus>X\<leftarrow>Us. X); Ball (set Ws) IGRep \<and> 0 \<notin> set Ws \<and> W = (\<Oplus>X\<leftarrow>Ws. X)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by    fastforce
[PROOF STATE]
proof (state)
this:
Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> U = (\<Oplus>X\<leftarrow>Us. X)
Ball (set Ws) IGRep \<and> 0 \<notin> set Ws \<and> W = (\<Oplus>X\<leftarrow>Ws. X)

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
hence Us: "Ball (set Us) IGRep" "0 \<notin> set Us" "U = (\<Oplus>X\<leftarrow>Us. X)"
        and Ws: "Ball (set Ws) IGRep" "0 \<notin> set Ws" "W = (\<Oplus>X\<leftarrow>Ws. X)"
[PROOF STATE]
proof (prove)
using this:
Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> U = (\<Oplus>X\<leftarrow>Us. X)
Ball (set Ws) IGRep \<and> 0 \<notin> set Ws \<and> W = (\<Oplus>X\<leftarrow>Ws. X)

goal (1 subgoal):
 1. (Ball (set Us) IGRep &&& 0 \<notin> set Us &&& U = (\<Oplus>X\<leftarrow>Us. X)) &&& Ball (set Ws) IGRep &&& 0 \<notin> set Ws &&& W = (\<Oplus>X\<leftarrow>Ws. X)
[PROOF STEP]
by  auto
[PROOF STATE]
proof (state)
this:
Ball (set Us) IGRep
0 \<notin> set Us
U = (\<Oplus>X\<leftarrow>Us. X)
Ball (set Ws) IGRep
0 \<notin> set Ws
W = (\<Oplus>X\<leftarrow>Ws. X)

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
from Us(1) Ws(1)
[PROOF STATE]
proof (chain)
picking this:
Ball (set Us) IGRep
Ball (set Ws) IGRep
[PROOF STEP]
have "Ball (set (Us@Ws)) IGRep"
[PROOF STATE]
proof (prove)
using this:
Ball (set Us) IGRep
Ball (set Ws) IGRep

goal (1 subgoal):
 1. Ball (set (Us @ Ws)) IGRep
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Ball (set (Us @ Ws)) IGRep

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Ball (set (Us @ Ws)) IGRep

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
from Us(2) Ws(2)
[PROOF STATE]
proof (chain)
picking this:
0 \<notin> set Us
0 \<notin> set Ws
[PROOF STEP]
have "0 \<notin> set (Us@Ws)"
[PROOF STATE]
proof (prove)
using this:
0 \<notin> set Us
0 \<notin> set Ws

goal (1 subgoal):
 1. 0 \<notin> set (Us @ Ws)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<notin> set (Us @ Ws)

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<notin> set (Us @ Ws)

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
have "V = (\<Oplus>X\<leftarrow>(Us@Ws). X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
from U(2) Us(3) W(2) Ws(3)
[PROOF STATE]
proof (chain)
picking this:
U \<noteq> 0
U = (\<Oplus>X\<leftarrow>Us. X)
W \<noteq> 0
W = (\<Oplus>X\<leftarrow>Ws. X)
[PROOF STEP]
have  indUs: "add_independentS Us"
          and   indWs: "add_independentS Ws"
[PROOF STATE]
proof (prove)
using this:
U \<noteq> 0
U = (\<Oplus>X\<leftarrow>Us. X)
W \<noteq> 0
W = (\<Oplus>X\<leftarrow>Ws. X)

goal (1 subgoal):
 1. add_independentS Us &&& add_independentS Ws
[PROOF STEP]
using inner_dirsumD2
[PROOF STATE]
proof (prove)
using this:
U \<noteq> 0
U = (\<Oplus>X\<leftarrow>Us. X)
W \<noteq> 0
W = (\<Oplus>X\<leftarrow>Ws. X)
\<not> add_independentS ?Ms \<Longrightarrow> (\<Oplus>M\<leftarrow>?Ms. M) = 0

goal (1 subgoal):
 1. add_independentS Us &&& add_independentS Ws
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
add_independentS Us
add_independentS Ws

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
add_independentS Us
add_independentS Ws

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
from IGRep_def Us(1)
[PROOF STATE]
proof (chain)
picking this:
IGRep = IrrFinGroupRepresentation G fgsmult
Ball (set Us) IGRep
[PROOF STEP]
have "Ball (set Us) ((\<in>) 0)"
[PROOF STATE]
proof (prove)
using this:
IGRep = IrrFinGroupRepresentation G fgsmult
Ball (set Us) IGRep

goal (1 subgoal):
 1. Ball (set Us) ((\<in>) (0::'a))
[PROOF STEP]
using IrrFinGroupRepresentation.axioms(1)[of G fgsmult]
                FinGroupRepresentation.zero_closed[of G fgsmult]
[PROOF STATE]
proof (prove)
using this:
IGRep = IrrFinGroupRepresentation G fgsmult
Ball (set Us) IGRep
IrrFinGroupRepresentation G fgsmult ?V \<Longrightarrow> FinGroupRepresentation G fgsmult ?V
FinGroupRepresentation G fgsmult ?V \<Longrightarrow> (0::'a) \<in> ?V

goal (1 subgoal):
 1. Ball (set Us) ((\<in>) (0::'a))
[PROOF STEP]
by    fast
[PROOF STATE]
proof (state)
this:
Ball (set Us) ((\<in>) (0::'a))

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Ball (set Us) ((\<in>) (0::'a))

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
from Us(3) Ws(3) BothFalse Vdecompose indUs indWs
[PROOF STATE]
proof (chain)
picking this:
U = (\<Oplus>X\<leftarrow>Us. X)
W = (\<Oplus>X\<leftarrow>Ws. X)
\<not> IGRep V \<and> V \<noteq> 0
V = U \<oplus> W
add_independentS Us
add_independentS Ws
[PROOF STEP]
have "add_independentS [(\<Sum>X\<leftarrow>Us. X),(\<Sum>X\<leftarrow>Ws. X)]"
[PROOF STATE]
proof (prove)
using this:
U = (\<Oplus>X\<leftarrow>Us. X)
W = (\<Oplus>X\<leftarrow>Ws. X)
\<not> IGRep V \<and> V \<noteq> 0
V = U \<oplus> W
add_independentS Us
add_independentS Ws

goal (1 subgoal):
 1. add_independentS [\<Sum>X\<leftarrow>Us. X, \<Sum>X\<leftarrow>Ws. X]
[PROOF STEP]
using inner_dirsumD2[of "[U,W]"] inner_dirsumD[of Us]
                inner_dirsumD[of Ws]
[PROOF STATE]
proof (prove)
using this:
U = (\<Oplus>X\<leftarrow>Us. X)
W = (\<Oplus>X\<leftarrow>Ws. X)
\<not> IGRep V \<and> V \<noteq> 0
V = U \<oplus> W
add_independentS Us
add_independentS Ws
\<not> add_independentS [U, W] \<Longrightarrow> (\<Oplus>M\<leftarrow>[U, W]. M) = 0
add_independentS Us \<Longrightarrow> (\<Oplus>M\<leftarrow>Us. M) = (\<Sum>M\<leftarrow>Us. M)
add_independentS Ws \<Longrightarrow> (\<Oplus>M\<leftarrow>Ws. M) = (\<Sum>M\<leftarrow>Ws. M)

goal (1 subgoal):
 1. add_independentS [\<Sum>X\<leftarrow>Us. X, \<Sum>X\<leftarrow>Ws. X]
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
add_independentS [\<Sum>X\<leftarrow>Us. X, \<Sum>X\<leftarrow>Ws. X]

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
add_independentS Us
add_independentS Ws
Ball (set Us) ((\<in>) (0::'a))
add_independentS [\<Sum>X\<leftarrow>Us. X, \<Sum>X\<leftarrow>Ws. X]
[PROOF STEP]
have "add_independentS (Us@Ws)"
[PROOF STATE]
proof (prove)
using this:
add_independentS Us
add_independentS Ws
Ball (set Us) ((\<in>) (0::'a))
add_independentS [\<Sum>X\<leftarrow>Us. X, \<Sum>X\<leftarrow>Ws. X]

goal (1 subgoal):
 1. add_independentS (Us @ Ws)
[PROOF STEP]
by (metis add_independentS_double_sum_conv_append)
[PROOF STATE]
proof (state)
this:
add_independentS (Us @ Ws)

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
add_independentS (Us @ Ws)

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
from W(1) Ws(3) indWs
[PROOF STATE]
proof (chain)
picking this:
GSubspace W
W = (\<Oplus>X\<leftarrow>Ws. X)
add_independentS Ws
[PROOF STEP]
have "0 \<in> (\<Sum>X\<leftarrow>Ws. X)"
[PROOF STATE]
proof (prove)
using this:
GSubspace W
W = (\<Oplus>X\<leftarrow>Ws. X)
add_independentS Ws

goal (1 subgoal):
 1. (0::'a) \<in> (\<Sum>X\<leftarrow>Ws. X)
[PROOF STEP]
using inner_dirsumD GSubspace_def RModule.zero_closed
[PROOF STATE]
proof (prove)
using this:
GSubspace W
W = (\<Oplus>X\<leftarrow>Ws. X)
add_independentS Ws
add_independentS ?Ms \<Longrightarrow> (\<Oplus>M\<leftarrow>?Ms. M) = (\<Sum>M\<leftarrow>?Ms. M)
GSubspace = (\<lambda>N. RModule (aezfun_setspan G) fgsmult N \<and> N \<subseteq> V)
RModule ?R ?smult ?M \<Longrightarrow> (0::?'m) \<in> ?M

goal (1 subgoal):
 1. (0::'a) \<in> (\<Sum>X\<leftarrow>Ws. X)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
(0::'a) \<in> (\<Sum>X\<leftarrow>Ws. X)

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
add_independentS (Us @ Ws)
(0::'a) \<in> (\<Sum>X\<leftarrow>Ws. X)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
add_independentS (Us @ Ws)
(0::'a) \<in> (\<Sum>X\<leftarrow>Ws. X)

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
using Vdecompose Us(3) Ws(3) inner_dirsum_append
[PROOF STATE]
proof (prove)
using this:
add_independentS (Us @ Ws)
(0::'a) \<in> (\<Sum>X\<leftarrow>Ws. X)
V = U \<oplus> W
U = (\<Oplus>X\<leftarrow>Us. X)
W = (\<Oplus>X\<leftarrow>Ws. X)
\<lbrakk>add_independentS (?As @ ?Bs); (0::?'a) \<in> (\<Sum>X\<leftarrow>?Bs. X)\<rbrakk> \<Longrightarrow> (\<Oplus>X\<leftarrow>?As @ ?Bs. X) = (\<Oplus>X\<leftarrow>?As. X) \<oplus> (\<Oplus>X\<leftarrow>?Bs. X)

goal (1 subgoal):
 1. V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
V = (\<Oplus>X\<leftarrow>Us @ Ws. X)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
V = (\<Oplus>X\<leftarrow>Us @ Ws. X)

goal (1 subgoal):
 1. \<not> IGRep V \<and> V \<noteq> 0 \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Ball (set (Us @ Ws)) IGRep
0 \<notin> set (Us @ Ws)
V = (\<Oplus>X\<leftarrow>Us @ Ws. X)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Ball (set (Us @ Ws)) IGRep
0 \<notin> set (Us @ Ws)
V = (\<Oplus>X\<leftarrow>Us @ Ws. X)

goal (1 subgoal):
 1. \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
GRep V \<and> n = fdim V \<Longrightarrow> \<exists>Us. Ball (set Us) IGRep \<and> 0 \<notin> set Us \<and> V = (\<Oplus>U\<leftarrow>Us. U)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Nonce_supply3: "\<exists>N N' N''. Nonce N \<notin> used evs \<and> Nonce N' \<notin> used evs' \<and>
                    Nonce N'' \<notin> used evs'' \<and> N \<noteq> N' \<and> N' \<noteq> N'' \<and> N \<noteq> N''"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>N N' N''. Nonce N \<notin> used evs \<and> Nonce N' \<notin> used evs' \<and> Nonce N'' \<notin> used evs'' \<and> N \<noteq> N' \<and> N' \<noteq> N'' \<and> N \<noteq> N''
[PROOF STEP]
apply (cut_tac evs = evs in Nonce_supply_lemma)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. Nonce n \<notin> used evs \<Longrightarrow> \<exists>N N' N''. Nonce N \<notin> used evs \<and> Nonce N' \<notin> used evs' \<and> Nonce N'' \<notin> used evs'' \<and> N \<noteq> N' \<and> N' \<noteq> N'' \<and> N \<noteq> N''
[PROOF STEP]
apply (cut_tac evs = "evs'" in Nonce_supply_lemma)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>N. \<forall>n\<ge>N. Nonce n \<notin> used evs; \<exists>N. \<forall>n\<ge>N. Nonce n \<notin> used evs'\<rbrakk> \<Longrightarrow> \<exists>N N' N''. Nonce N \<notin> used evs \<and> Nonce N' \<notin> used evs' \<and> Nonce N'' \<notin> used evs'' \<and> N \<noteq> N' \<and> N' \<noteq> N'' \<and> N \<noteq> N''
[PROOF STEP]
apply (cut_tac evs = "evs''" in Nonce_supply_lemma, clarify)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>N Na Nb. \<lbrakk>\<forall>n\<ge>N. Nonce n \<notin> used evs; \<forall>n\<ge>Na. Nonce n \<notin> used evs'; \<forall>n\<ge>Nb. Nonce n \<notin> used evs''\<rbrakk> \<Longrightarrow> \<exists>N N' N''. Nonce N \<notin> used evs \<and> Nonce N' \<notin> used evs' \<and> Nonce N'' \<notin> used evs'' \<and> N \<noteq> N' \<and> N' \<noteq> N'' \<and> N \<noteq> N''
[PROOF STEP]
apply (rule_tac x = N in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>N Na Nb. \<lbrakk>\<forall>n\<ge>N. Nonce n \<notin> used evs; \<forall>n\<ge>Na. Nonce n \<notin> used evs'; \<forall>n\<ge>Nb. Nonce n \<notin> used evs''\<rbrakk> \<Longrightarrow> \<exists>N' N''. Nonce N \<notin> used evs \<and> Nonce N' \<notin> used evs' \<and> Nonce N'' \<notin> used evs'' \<and> N \<noteq> N' \<and> N' \<noteq> N'' \<and> N \<noteq> N''
[PROOF STEP]
apply (rule_tac x = "Suc (N+Na)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>N Na Nb. \<lbrakk>\<forall>n\<ge>N. Nonce n \<notin> used evs; \<forall>n\<ge>Na. Nonce n \<notin> used evs'; \<forall>n\<ge>Nb. Nonce n \<notin> used evs''\<rbrakk> \<Longrightarrow> \<exists>N''. Nonce N \<notin> used evs \<and> Nonce (Suc (N + Na)) \<notin> used evs' \<and> Nonce N'' \<notin> used evs'' \<and> N \<noteq> Suc (N + Na) \<and> Suc (N + Na) \<noteq> N'' \<and> N \<noteq> N''
[PROOF STEP]
apply (rule_tac x = "Suc (Suc (N+Na+Nb))" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>N Na Nb. \<lbrakk>\<forall>n\<ge>N. Nonce n \<notin> used evs; \<forall>n\<ge>Na. Nonce n \<notin> used evs'; \<forall>n\<ge>Nb. Nonce n \<notin> used evs''\<rbrakk> \<Longrightarrow> Nonce N \<notin> used evs \<and> Nonce (Suc (N + Na)) \<notin> used evs' \<and> Nonce (Suc (Suc (N + Na + Nb))) \<notin> used evs'' \<and> N \<noteq> Suc (N + Na) \<and> Suc (N + Na) \<noteq> Suc (Suc (N + Na + Nb)) \<and> N \<noteq> Suc (Suc (N + Na + Nb))
[PROOF STEP]
apply (simp (no_asm_simp) add: less_not_refl3 le_add1 le_add2 less_Suc_eq_le)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma less_eq_multiset\<^sub>H\<^sub>O:
  "M \<le> N \<longleftrightarrow> (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x. y < x \<and> count M x < count N x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (M \<le> N) = (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x>y. count M x < count N x))
[PROOF STEP]
by (auto simp: less_eq_multiset_def less_multiset\<^sub>H\<^sub>O)


[STATEMENT]
theorem per_pref: "x \<le>p r\<^sup>\<omega> \<longleftrightarrow> (\<exists> k. x \<le>p r\<^sup>@k) \<and> r \<noteq> \<epsilon>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le>p r\<^sup>\<omega> = ((\<exists>k. x \<le>p r \<^sup>@ k) \<and> r \<noteq> \<epsilon>)
[PROOF STEP]
using per_pref_ex period_root_def pref_pow_ext' pref_prod_pref
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?u \<le>p ?r\<^sup>\<omega>; \<And>n. \<lbrakk>?u \<le>p ?r \<^sup>@ n; n \<noteq> 0\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
?u \<le>p ?r\<^sup>\<omega> = (?u \<le>p ?r \<cdot> ?u \<and> ?r \<noteq> \<epsilon>)
?u \<le>p ?r \<^sup>@ ?k \<Longrightarrow> ?u \<le>p ?r \<cdot> ?r \<^sup>@ ?k
\<lbrakk>?u \<le>p ?z \<cdot> ?w; ?u \<le>p ?w\<rbrakk> \<Longrightarrow> ?u \<le>p ?z \<cdot> ?u

goal (1 subgoal):
 1. x \<le>p r\<^sup>\<omega> = ((\<exists>k. x \<le>p r \<^sup>@ k) \<and> r \<noteq> \<epsilon>)
[PROOF STEP]
by metis


[STATEMENT]
lemma SN_relto_Un:
  "SN (relto (R \<union> S) Q) \<longleftrightarrow> SN (relto R (S \<union> Q)) \<and> SN (relto S Q)"
    (is "SN ?a \<longleftrightarrow> SN ?b \<and> SN ?c")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))
[PROOF STEP]
have eq: "?a^+ = ?b^+ \<union> ?c^+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+ = ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*)\<^sup>+ \<union> (Q\<^sup>* O S O Q\<^sup>*)\<^sup>+
[PROOF STEP]
by regexp
[PROOF STATE]
proof (state)
this:
(Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+ = ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*)\<^sup>+ \<union> (Q\<^sup>* O S O Q\<^sup>*)\<^sup>+

goal (1 subgoal):
 1. SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))
[PROOF STEP]
from SN_Un_conv[of "?b^+" "?c^+", unfolded eq[symmetric]]
[PROOF STATE]
proof (chain)
picking this:
trans ((Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+) \<Longrightarrow> SN ((Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+) = (SN (((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*)\<^sup>+) \<and> SN ((Q\<^sup>* O S O Q\<^sup>*)\<^sup>+))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
trans ((Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+) \<Longrightarrow> SN ((Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+) = (SN (((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*)\<^sup>+) \<and> SN ((Q\<^sup>* O S O Q\<^sup>*)\<^sup>+))

goal (1 subgoal):
 1. SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))
[PROOF STEP]
unfolding SN_trancl_SN_conv
[PROOF STATE]
proof (prove)
using this:
trans ((Q\<^sup>* O (R \<union> S) O Q\<^sup>*)\<^sup>+) \<Longrightarrow> SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))

goal (1 subgoal):
 1. SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
SN (Q\<^sup>* O (R \<union> S) O Q\<^sup>*) = (SN ((S \<union> Q)\<^sup>* O R O (S \<union> Q)\<^sup>*) \<and> SN (Q\<^sup>* O S O Q\<^sup>*))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma arith_prog_to_multi:
  "arith_prog start step c =
    multi_arith_prog 1 start (\<lambda>_. step) (\<lambda>_. c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arith_prog start step c = multi_arith_prog 1 start (\<lambda>_. step) (\<lambda>_. c)
[PROOF STEP]
unfolding multi_arith_prog_def arith_prog_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. start + int (c * step) = start + int (\<Sum>i<1. c * step)
[PROOF STEP]
by auto


[STATEMENT]
lemma "\<not> (\<forall>(i::int). 4 \<le> i \<longrightarrow> (\<exists>x y. 0 \<le> x \<and> 0 \<le> y \<and> 3 * x + 5 * y = i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (\<forall>i\<ge>4. \<exists>x y. 0 \<le> x \<and> 0 \<le> y \<and> 3 * x + 5 * y = i)
[PROOF STEP]
by cooper


[STATEMENT]
lemma (in complex_inner) cinner_eq_flip: \<open>(cinner x y = cinner z w) \<longleftrightarrow> (cinner y x = cinner w z)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<bullet>\<^sub>C y = z \<bullet>\<^sub>C w) = (y \<bullet>\<^sub>C x = w \<bullet>\<^sub>C z)
[PROOF STEP]
by (metis cinner_commute)


[STATEMENT]
lemma inpt_lemma:
  "\<lbrakk>Suc (length xs) = vl\<rbrakk> \<Longrightarrow>
            rec_exec (rec_inpt vl) (m # xs) = inpt m xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (length xs) = vl \<Longrightarrow> rec_exec (rec_inpt vl) (m # xs) = inpt m xs
[PROOF STEP]
apply(auto simp: rec_exec.simps rec_inpt_def
      trpl_lemma inpt.simps strt_lemma)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>vl = Suc (length xs); Suc 0 \<le> length xs\<rbrakk> \<Longrightarrow> trpl 0 (Suc 0) (strt (map ((\<lambda>a. rec_exec a (m # xs)) \<circ> recf.id (Suc (length xs))) [Suc 0..<length xs] @ [(m # xs) ! length xs])) = trpl 0 (Suc 0) (strt xs)
 2. \<lbrakk>vl = Suc (length xs); \<not> Suc 0 \<le> length xs\<rbrakk> \<Longrightarrow> trpl 0 (Suc 0) (strt []) = trpl 0 (Suc 0) (strt xs)
[PROOF STEP]
apply(subgoal_tac
      "(map ((\<lambda>a. rec_exec a (m # xs)) \<circ>
          (\<lambda>i. recf.id (Suc (length xs)) (i)))
            [Suc 0..<length xs] @ [(m # xs) ! length xs]) = xs", simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>vl = Suc (length xs); Suc 0 \<le> length xs\<rbrakk> \<Longrightarrow> map ((\<lambda>a. rec_exec a (m # xs)) \<circ> recf.id (Suc (length xs))) [Suc 0..<length xs] @ [(m # xs) ! length xs] = xs
 2. \<lbrakk>vl = Suc (length xs); \<not> Suc 0 \<le> length xs\<rbrakk> \<Longrightarrow> trpl 0 (Suc 0) (strt []) = trpl 0 (Suc 0) (strt xs)
[PROOF STEP]
apply(auto elim:nonempty_listE, cases xs, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cos_arg:
  assumes "z \<noteq> 0"
  shows "cos (Arg z) = Re z / cmod z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos (Arg z) = Re z / cmod z
[PROOF STEP]
by (metis Complex.Re_sgn cis.simps(1) assms cis_Arg)


[STATEMENT]
lemma subdistl_iso:
  fixes f :: "'a \<Rightarrow> 'b::complete_lattice"
  shows "(f \<circ> Inf \<le> Inf \<circ> (`) f) = mono f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<circ> Inf \<le> Inf \<circ> (`) f) = mono f
[PROOF STEP]
using Inf_subdistl_iso iso_Inf_subdistl
[PROOF STATE]
proof (prove)
using this:
?f \<circ> Inf \<le> Inf \<circ> (`) ?f \<Longrightarrow> mono ?f
mono ?f \<Longrightarrow> ?f \<circ> Inf \<le> Inf \<circ> (`) ?f

goal (1 subgoal):
 1. (f \<circ> Inf \<le> Inf \<circ> (`) f) = mono f
[PROOF STEP]
by force


[STATEMENT]
lemma powhr_gt_zero [simp]: "\<And>a x. 0 < x powhr a \<longleftrightarrow> x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a x. (0 < x powhr a) = (x \<noteq> 0)
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma mon_group_mul_eq:
    "(\<lambda>(x,y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G
     \<longleftrightarrow> A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>(x, y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G) = (A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>(x, y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G) = (A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x))
[PROOF STEP]
have subGA: "generate G (carrier G \<inter> A) \<subseteq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. generate G (carrier G \<inter> A) \<subseteq> A
[PROOF STEP]
by (simp add: AG.subgroup_axioms generate_subgroup_incl)
[PROOF STATE]
proof (state)
this:
generate G (carrier G \<inter> A) \<subseteq> A

goal (1 subgoal):
 1. ((\<lambda>(x, y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G) = (A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x))
[PROOF STEP]
have subGB: "generate G (carrier G \<inter> B) \<subseteq> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. generate G (carrier G \<inter> B) \<subseteq> B
[PROOF STEP]
by (simp add: BG.subgroup_axioms generate_subgroup_incl)
[PROOF STATE]
proof (state)
this:
generate G (carrier G \<inter> B) \<subseteq> B

goal (1 subgoal):
 1. ((\<lambda>(x, y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G) = (A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>(x, y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G) = (A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x))
[PROOF STEP]
apply (auto simp: mon_def hom_group_mul_eq simp flip: subset_one)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x; inj_on (\<lambda>(x, y). x \<otimes> y) (A \<times> B); x \<in> A; x \<in> B\<rbrakk> \<Longrightarrow> x = \<one>
 2. \<lbrakk>A \<inter> B \<subseteq> {\<one>}; \<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x\<rbrakk> \<Longrightarrow> inj_on (\<lambda>(x, y). x \<otimes> y) (A \<times> B)
[PROOF STEP]
apply (simp_all (no_asm_use) add: inj_on_def AG.carrier_subgroup_generated_subgroup BG.carrier_subgroup_generated_subgroup)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x; \<forall>x\<in>A. \<forall>y\<in>B. \<forall>xa\<in>A. \<forall>ya\<in>B. x \<otimes> y = xa \<otimes> ya \<longrightarrow> x = xa \<and> y = ya; x \<in> A; x \<in> B\<rbrakk> \<Longrightarrow> x = \<one>
 2. \<lbrakk>A \<inter> B \<subseteq> {\<one>}; \<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x\<rbrakk> \<Longrightarrow> \<forall>x\<in>A. \<forall>y\<in>B. \<forall>xa\<in>A. \<forall>ya\<in>B. x \<otimes> y = xa \<otimes> ya \<longrightarrow> x = xa \<and> y = ya
[PROOF STEP]
using cancel
[PROOF STATE]
proof (prove)
using this:
(A \<inter> B \<subseteq> {\<one>}) = (\<forall>x\<in>A. \<forall>y\<in>B. \<forall>x'\<in>A. \<forall>y'\<in>B. x \<otimes> y = x' \<otimes> y' \<longrightarrow> x = x' \<and> y = y')

goal (2 subgoals):
 1. \<And>x. \<lbrakk>\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x; \<forall>x\<in>A. \<forall>y\<in>B. \<forall>xa\<in>A. \<forall>ya\<in>B. x \<otimes> y = xa \<otimes> ya \<longrightarrow> x = xa \<and> y = ya; x \<in> A; x \<in> B\<rbrakk> \<Longrightarrow> x = \<one>
 2. \<lbrakk>A \<inter> B \<subseteq> {\<one>}; \<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x\<rbrakk> \<Longrightarrow> \<forall>x\<in>A. \<forall>y\<in>B. \<forall>xa\<in>A. \<forall>ya\<in>B. x \<otimes> y = xa \<otimes> ya \<longrightarrow> x = xa \<and> y = ya
[PROOF STEP]
apply blast+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
((\<lambda>(x, y). x \<otimes> y) \<in> mon (subgroup_generated G A \<times>\<times> subgroup_generated G B) G) = (A \<inter> B = {\<one>} \<and> (\<forall>x\<in>A. \<forall>y\<in>B. x \<otimes> y = y \<otimes> x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cf_rcomp_Hom_ObjMap_vdomain[cat_cs_simps]:
  assumes "\<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<D>\<^sub>\<circ> (Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,\<GG>-)\<lparr>ObjMap\<rparr>) = (op_cat \<CC> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,\<GG>-)\<lparr>ObjMap\<rparr>) = (op_cat \<CC> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,\<GG>-)\<lparr>ObjMap\<rparr>) = (op_cat \<CC> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>
[PROOF STEP]
by
    (
      cs_concl cs_shallow
        cs_simp: cat_cs_simps cf_rcomp_Hom_def cs_intro: cat_cs_intros
    )


[STATEMENT]
lemma disjoint_darcs_if_wf_aux5:
  "\<lbrakk>wf_darcs (Node r xs); (t1,e1) \<in> fset xs; (t2,e2) \<in> fset xs; (t1,e1) \<noteq> (t2,e2)\<rbrakk>
    \<Longrightarrow>(darcs t1 \<union> {e1}) \<inter> (darcs t2 \<union> {e2}) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_darcs (Node r xs); (t1, e1) \<in> fset xs; (t2, e2) \<in> fset xs; (t1, e1) \<noteq> (t2, e2)\<rbrakk> \<Longrightarrow> (darcs t1 \<union> {e1}) \<inter> (darcs t2 \<union> {e2}) = {}
[PROOF STEP]
by (auto dest: disjoint_darcs_if_wf_aux4 disjoint_darcs_if_wf_aux3 disjoint_darcs_if_wf_aux2)


[STATEMENT]
lemma comp_left_dist_sum:
  fixes f :: "'b::finite \<Rightarrow> 'a"
  shows "(\<Squnion>\<^sub>k x * f k) = x * (\<Squnion>\<^sub>k f k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comm_monoid_add.sum (\<squnion>) bot (\<lambda>k. x * f k) {k. True} = x * comm_monoid_add.sum (\<squnion>) bot f {k. True}
[PROOF STEP]
proof (induct rule: one_sup_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. x * f i = x * f i
 2. \<And>j I. \<lbrakk>j \<notin> I; comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I\<rbrakk> \<Longrightarrow> x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)
[PROOF STEP]
case one
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>i. x * f i = x * f i
 2. \<And>j I. \<lbrakk>j \<notin> I; comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I\<rbrakk> \<Longrightarrow> x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * f i_ = x * f i_
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x * f i_ = x * f i_

goal (1 subgoal):
 1. \<And>j I. \<lbrakk>j \<notin> I; comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I\<rbrakk> \<Longrightarrow> x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>j I. \<lbrakk>j \<notin> I; comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I\<rbrakk> \<Longrightarrow> x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)
[PROOF STEP]
case (sup j I)
[PROOF STATE]
proof (state)
this:
j \<notin> I
comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I

goal (1 subgoal):
 1. \<And>j I. \<lbrakk>j \<notin> I; comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I\<rbrakk> \<Longrightarrow> x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
j \<notin> I
comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * comm_monoid_add.sum (\<squnion>) bot f I

goal (1 subgoal):
 1. x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)
[PROOF STEP]
by (simp add: mult_left_dist_sup)
[PROOF STATE]
proof (state)
this:
x * f j \<squnion> comm_monoid_add.sum (\<squnion>) bot (\<lambda>i. x * f i) I = x * (f j \<squnion> comm_monoid_add.sum (\<squnion>) bot f I)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma order_divides_totient:
  "ord n a dvd totient n" if "coprime n a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ord n a dvd totient n
[PROOF STEP]
using that euler_theorem [of a n]
[PROOF STATE]
proof (prove)
using this:
coprime n a
coprime a n \<Longrightarrow> [a ^ totient n = 1] (mod n)

goal (1 subgoal):
 1. ord n a dvd totient n
[PROOF STEP]
by (simp add: ord_divides [symmetric] ac_simps)


[STATEMENT]
lemma coeffM_zero_code [code abstract]: "vec_nth (coeffM_zero A) = coeffM_zero_row A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (coeffM_zero A) = coeffM_zero_row A
[PROOF STEP]
unfolding coeffM_zero_def coeffM_zero_row_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>i j. coeff (A $ i $ j) 0) = (\<lambda>i. \<chi>j. coeff (A $ i $ j) 0)
[PROOF STEP]
using vec_lambda_beta
[PROOF STATE]
proof (prove)
using this:
vec_lambda ?g $ ?i = ?g ?i

goal (1 subgoal):
 1. ($) (\<chi>i j. coeff (A $ i $ j) 0) = (\<lambda>i. \<chi>j. coeff (A $ i $ j) 0)
[PROOF STEP]
by auto


[STATEMENT]
lemma neg_minus_divideR_less_eq [field_simps]:
  "- (b /\<^sub>R c) < a \<longleftrightarrow> c *\<^sub>R a < - b" if "c < 0"
    for a b :: "'a :: ordered_real_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- (b /\<^sub>R c) < a) = (c *\<^sub>R a < - b)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
c < 0

goal (1 subgoal):
 1. (- (b /\<^sub>R c) < a) = (c *\<^sub>R a < - b)
[PROOF STEP]
by (simp add: less_le_not_le neg_le_minus_divideR_eq neg_minus_divideR_le_eq)


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


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

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


[STATEMENT]
lemma poly_min_int_poly_0_eq_0_iff [simp]:
  fixes x :: "'a :: {field_char_0, field_gcd}"
  assumes "algebraic x"
  shows "poly (min_int_poly x) 0 = 0 \<longleftrightarrow> x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (poly (min_int_poly x) 0 = 0) = (x = (0::'a))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly (min_int_poly x) 0 = 0 \<Longrightarrow> x = (0::'a)
 2. x = (0::'a) \<Longrightarrow> poly (min_int_poly x) 0 = 0
[PROOF STEP]
assume *: "poly (min_int_poly x) 0 = 0"
[PROOF STATE]
proof (state)
this:
poly (min_int_poly x) 0 = 0

goal (2 subgoals):
 1. poly (min_int_poly x) 0 = 0 \<Longrightarrow> x = (0::'a)
 2. x = (0::'a) \<Longrightarrow> poly (min_int_poly x) 0 = 0
[PROOF STEP]
show "x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = (0::'a)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
assume "x \<noteq> 0"
[PROOF STATE]
proof (state)
this:
x \<noteq> (0::'a)

goal (1 subgoal):
 1. x \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
hence "poly (min_int_poly x) 0 \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)

goal (1 subgoal):
 1. poly (min_int_poly x) 0 \<noteq> 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)
algebraic x

goal (1 subgoal):
 1. poly (min_int_poly x) 0 \<noteq> 0
[PROOF STEP]
by (intro represents_irr_non_0) auto
[PROOF STATE]
proof (state)
this:
poly (min_int_poly x) 0 \<noteq> 0

goal (1 subgoal):
 1. x \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
poly (min_int_poly x) 0 = 0
poly (min_int_poly x) 0 \<noteq> 0
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
poly (min_int_poly x) 0 = 0
poly (min_int_poly x) 0 \<noteq> 0

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x = (0::'a)

goal (1 subgoal):
 1. x = (0::'a) \<Longrightarrow> poly (min_int_poly x) 0 = 0
[PROOF STEP]
qed auto


[STATEMENT]
lemma restrict_star_unfold:
  "[l]\<langle>(mone::('a::finite,'b::kleene_algebra) square)\<rangle>[l] \<oplus> [l]\<langle>f\<rangle>[l] \<odot> [l]\<langle>star o f\<rangle>[l] = [l]\<langle>star o f\<rangle>[l]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l] = [l] \<langle>star \<circ> f\<rangle> [l]
[PROOF STEP]
proof (rule ext, rule prod_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
let ?o = "mone::('a,'b::kleene_algebra) square"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
fix i j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "([l]\<langle>?o\<rangle>[l] \<oplus> [l]\<langle>f\<rangle>[l] \<odot> [l]\<langle>star o f\<rangle>[l]) (i,j) = ([l]\<langle>?o\<rangle>[l]) (i,j) \<squnion> ([l]\<langle>f\<rangle>[l] \<odot> [l]\<langle>star o f\<rangle>[l]) (i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> ([l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j)
[PROOF STEP]
by (simp add: sup_matrix_def)
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> ([l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> ([l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = ([l]\<langle>?o\<rangle>[l]) (i,j) \<squnion> (\<Squnion>\<^sub>k ([l]\<langle>f\<rangle>[l]) (i,k) * ([l]\<langle>star o f\<rangle>[l]) (k,j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> ([l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. ([l] \<langle>f\<rangle> [l]) (i, k) * ([l] \<langle>star \<circ> f\<rangle> [l]) (k, j)) {k. True}
[PROOF STEP]
by (simp add: times_matrix_def)
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> ([l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. ([l] \<langle>f\<rangle> [l]) (i, k) * ([l] \<langle>star \<circ> f\<rangle> [l]) (k, j)) {k. True}

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> ([l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. ([l] \<langle>f\<rangle> [l]) (i, k) * ([l] \<langle>star \<circ> f\<rangle> [l]) (k, j)) {k. True}

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = ([l]\<langle>?o\<rangle>[l]) (i,j) \<squnion> (\<Squnion>\<^sub>k (if i = l \<and> k = l then f (i,k) else bot) * (if k = l \<and> j = l then (f (k,j))\<^sup>\<star> else bot))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. ([l] \<langle>f\<rangle> [l]) (i, k) * ([l] \<langle>star \<circ> f\<rangle> [l]) (k, j)) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True}
[PROOF STEP]
by (simp add: restrict_singleton o_def)
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. ([l] \<langle>f\<rangle> [l]) (i, k) * ([l] \<langle>star \<circ> f\<rangle> [l]) (k, j)) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True}

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. ([l] \<langle>f\<rangle> [l]) (i, k) * ([l] \<langle>star \<circ> f\<rangle> [l]) (k, j)) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True}

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = ([l]\<langle>?o\<rangle>[l]) (i,j) \<squnion> (\<Squnion>\<^sub>k if k = l then (if i = l then f (i,k) else bot) * (if j = l then (f (k,j))\<^sup>\<star> else bot) else bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True}
[PROOF STEP]
apply (rule arg_cong2[where f=sup])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ([l] \<langle>mone\<rangle> [l]) (i, j) = ([l] \<langle>mone\<rangle> [l]) (i, j)
 2. sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True} = sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True} = sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True}
[PROOF STEP]
by (rule sup_monoid.sum.cong) auto
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True}

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. (if i = l \<and> k = l then f (i, k) else bot) * (if k = l \<and> j = l then f (k, j)\<^sup>\<star> else bot)) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True}

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = ([l]\<langle>?o\<rangle>[l]) (i,j) \<squnion> (if i = l then f (i,l) else bot) * (if j = l then (f (l,j))\<^sup>\<star> else bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> (if i = l then f (i, l) else bot) * (if j = l then f (l, j)\<^sup>\<star> else bot)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> (if i = l then f (i, l) else bot) * (if j = l then f (l, j)\<^sup>\<star> else bot)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> sup_monoid.sum (\<lambda>k. if k = l then (if i = l then f (i, k) else bot) * (if j = l then f (k, j)\<^sup>\<star> else bot) else bot) {k. True} = ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> (if i = l then f (i, l) else bot) * (if j = l then f (l, j)\<^sup>\<star> else bot)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = (if i = l \<and> j = l then 1 \<squnion> f (l,l) * (f (l,l))\<^sup>\<star> else bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> (if i = l then f (i, l) else bot) * (if j = l then f (l, j)\<^sup>\<star> else bot) = (if i = l \<and> j = l then Rf (f (l, l)) (f (l, l)\<^sup>\<star>) else bot)
[PROOF STEP]
by (simp add: restrict_singleton one_matrix_def)
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> (if i = l then f (i, l) else bot) * (if j = l then f (l, j)\<^sup>\<star> else bot) = (if i = l \<and> j = l then Rf (f (l, l)) (f (l, l)\<^sup>\<star>) else bot)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l]) (i, j) \<squnion> (if i = l then f (i, l) else bot) * (if j = l then f (l, j)\<^sup>\<star> else bot) = (if i = l \<and> j = l then Rf (f (l, l)) (f (l, l)\<^sup>\<star>) else bot)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = (if i = l \<and> j = l then (f (l,l))\<^sup>\<star> else bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if i = l \<and> j = l then Rf (f (l, l)) (f (l, l)\<^sup>\<star>) else bot) = (if i = l \<and> j = l then f (l, l)\<^sup>\<star> else bot)
[PROOF STEP]
by (simp add: star_left_unfold_equal)
[PROOF STATE]
proof (state)
this:
(if i = l \<and> j = l then Rf (f (l, l)) (f (l, l)\<^sup>\<star>) else bot) = (if i = l \<and> j = l then f (l, l)\<^sup>\<star> else bot)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(if i = l \<and> j = l then Rf (f (l, l)) (f (l, l)\<^sup>\<star>) else bot) = (if i = l \<and> j = l then f (l, l)\<^sup>\<star> else bot)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
have "... = ([l]\<langle>star o f\<rangle>[l]) (i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if i = l \<and> j = l then f (l, l)\<^sup>\<star> else bot) = ([l] \<langle>star \<circ> f\<rangle> [l]) (i, j)
[PROOF STEP]
by (simp add: restrict_singleton o_def)
[PROOF STATE]
proof (state)
this:
(if i = l \<and> j = l then f (l, l)\<^sup>\<star> else bot) = ([l] \<langle>star \<circ> f\<rangle> [l]) (i, j)

goal (1 subgoal):
 1. \<And>x a b. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (a, b) = ([l] \<langle>star \<circ> f\<rangle> [l]) (a, b)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>star \<circ> f\<rangle> [l]) (i, j)
[PROOF STEP]
show "([l]\<langle>?o\<rangle>[l] \<oplus> [l]\<langle>f\<rangle>[l] \<odot> [l]\<langle>star o f\<rangle>[l]) (i,j) = ([l]\<langle>star o f\<rangle>[l]) (i,j)"
[PROOF STATE]
proof (prove)
using this:
([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>star \<circ> f\<rangle> [l]) (i, j)

goal (1 subgoal):
 1. ([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>star \<circ> f\<rangle> [l]) (i, j)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
([l] \<langle>mone\<rangle> [l] \<oplus> [l] \<langle>f\<rangle> [l] \<odot> [l] \<langle>star \<circ> f\<rangle> [l]) (i, j) = ([l] \<langle>star \<circ> f\<rangle> [l]) (i, j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lemTime2Sym:
    shows "time2 x y = time2 y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. time2 x y = time2 y x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. time2 x y = time2 y x
[PROOF STEP]
define tsep where "tsep = tval x - tval y"
[PROOF STATE]
proof (state)
this:
tsep = tval x - tval y

goal (1 subgoal):
 1. time2 x y = time2 y x
[PROOF STEP]
have timexy: "time2 x y = tsep*tsep"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. time2 x y = tsep * tsep
[PROOF STEP]
by (simp add: tsep_def)
[PROOF STATE]
proof (state)
this:
time2 x y = tsep * tsep

goal (1 subgoal):
 1. time2 x y = time2 y x
[PROOF STEP]
have timeyx: "time2 y x = (-tsep)*(-tsep)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. time2 y x = - tsep * - tsep
[PROOF STEP]
by (simp add: tsep_def)
[PROOF STATE]
proof (state)
this:
time2 y x = - tsep * - tsep

goal (1 subgoal):
 1. time2 x y = time2 y x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
time2 y x = - tsep * - tsep

goal (1 subgoal):
 1. time2 x y = time2 y x
[PROOF STEP]
by (metis timexy diff_0_right minus_diff_eq minus_mult_left minus_mult_right)
[PROOF STATE]
proof (state)
this:
time2 x y = time2 y x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem (in valid_unMultigraph) euclerian_cycle_ex:
  assumes "is_Eulerian_circuit v ps v'" "finite V" "finite E"
  shows "\<forall>v\<in>V. even (degree v G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
obtain v ps v' where cycle:"is_Eulerian_circuit v ps v'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v ps v'. is_Eulerian_circuit v ps v' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_Eulerian_circuit v ps v'
finite V
finite E

goal (1 subgoal):
 1. (\<And>v ps v'. is_Eulerian_circuit v ps v' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_Eulerian_circuit v ps v'

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
hence "edges (rem_unPath ps G) = {}"
[PROOF STATE]
proof (prove)
using this:
is_Eulerian_circuit v ps v'

goal (1 subgoal):
 1. edges (rem_unPath ps G) = {}
[PROOF STEP]
unfolding is_Eulerian_circuit_def is_Eulerian_trail_def
[PROOF STATE]
proof (prove)
using this:
v = v' \<and> is_trail v ps v' \<and> edges (rem_unPath ps G) = {}

goal (1 subgoal):
 1. edges (rem_unPath ps G) = {}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
edges (rem_unPath ps G) = {}

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
edges (rem_unPath ps G) = {}

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
have "nodes (rem_unPath ps G)=nodes G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nodes (rem_unPath ps G) = V
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nodes (rem_unPath ps G) = V

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
edges (rem_unPath ps G) = {}
nodes (rem_unPath ps G) = V
[PROOF STEP]
have "rem_unPath ps G = G \<lparr>edges:={}\<rparr>"
[PROOF STATE]
proof (prove)
using this:
edges (rem_unPath ps G) = {}
nodes (rem_unPath ps G) = V

goal (1 subgoal):
 1. rem_unPath ps G = G\<lparr>edges := {}\<rparr>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rem_unPath ps G = G\<lparr>edges := {}\<rparr>

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
hence "num_of_odd_nodes (rem_unPath ps G) = 0"
[PROOF STATE]
proof (prove)
using this:
rem_unPath ps G = G\<lparr>edges := {}\<rparr>

goal (1 subgoal):
 1. num_of_odd_nodes (rem_unPath ps G) = 0
[PROOF STEP]
by (metis assms(2) odd_nodes_no_edge)
[PROOF STATE]
proof (state)
this:
num_of_odd_nodes (rem_unPath ps G) = 0

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
num_of_odd_nodes (rem_unPath ps G) = 0

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
have "v=v'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v = v'
[PROOF STEP]
by (metis \<open>is_Eulerian_circuit v ps v'\<close> is_Eulerian_circuit_def)
[PROOF STATE]
proof (state)
this:
v = v'

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
hence "num_of_odd_nodes (rem_unPath ps G)=num_of_odd_nodes G"
[PROOF STATE]
proof (prove)
using this:
v = v'

goal (1 subgoal):
 1. num_of_odd_nodes (rem_unPath ps G) = num_of_odd_nodes G
[PROOF STEP]
by (metis assms(2) assms(3) cycle is_Eulerian_circuit_def
        is_Eulerian_trail_def rem_UnPath_cycle)
[PROOF STATE]
proof (state)
this:
num_of_odd_nodes (rem_unPath ps G) = num_of_odd_nodes G

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
num_of_odd_nodes (rem_unPath ps G) = 0
num_of_odd_nodes (rem_unPath ps G) = num_of_odd_nodes G
[PROOF STEP]
have "num_of_odd_nodes G=0"
[PROOF STATE]
proof (prove)
using this:
num_of_odd_nodes (rem_unPath ps G) = 0
num_of_odd_nodes (rem_unPath ps G) = num_of_odd_nodes G

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

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
num_of_odd_nodes G = 0

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
have "finite(odd_nodes_set G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (odd_nodes_set G)
[PROOF STEP]
using \<open>finite V\<close>
[PROOF STATE]
proof (prove)
using this:
finite V

goal (1 subgoal):
 1. finite (odd_nodes_set G)
[PROOF STEP]
unfolding odd_nodes_set_def
[PROOF STATE]
proof (prove)
using this:
finite V

goal (1 subgoal):
 1. finite {v \<in> V. odd (degree v G)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (odd_nodes_set G)

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
num_of_odd_nodes G = 0
finite (odd_nodes_set G)
[PROOF STEP]
have "odd_nodes_set G = {}"
[PROOF STATE]
proof (prove)
using this:
num_of_odd_nodes G = 0
finite (odd_nodes_set G)

goal (1 subgoal):
 1. odd_nodes_set G = {}
[PROOF STEP]
unfolding num_of_odd_nodes_def
[PROOF STATE]
proof (prove)
using this:
card (odd_nodes_set G) = 0
finite (odd_nodes_set G)

goal (1 subgoal):
 1. odd_nodes_set G = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
odd_nodes_set G = {}

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
odd_nodes_set G = {}

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
unfolding odd_nodes_set_def
[PROOF STATE]
proof (prove)
using this:
{v \<in> V. odd (degree v G)} = {}

goal (1 subgoal):
 1. \<forall>v\<in>V. even (degree v G)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>v\<in>V. even (degree v G)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vector_minus_component [simp]: "(x - y)$i = x$i - y$i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - y) $ i = x $ i - y $ i
[PROOF STEP]
unfolding minus_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>i. x $ i - y $ i) $ i = x $ i - y $ i
[PROOF STEP]
by simp


[STATEMENT]
lemma topological_basisE:
  fixes O'
  assumes "topological_basis B"
    and "open O'"
    and "x \<in> O'"
  obtains B' where "B' \<in> B" "x \<in> B'" "B' \<subseteq> O'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>B'. \<lbrakk>B' \<in> B; x \<in> B'; B' \<subseteq> O'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof atomize_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
topological_basis B
open O'
x \<in> O'
[PROOF STEP]
have "\<And>B'. B'\<in>B \<Longrightarrow> open B'"
[PROOF STATE]
proof (prove)
using this:
topological_basis B
open O'
x \<in> O'

goal (1 subgoal):
 1. \<And>B'. B' \<in> B \<Longrightarrow> open B'
[PROOF STEP]
by (simp add: topological_basis_def)
[PROOF STATE]
proof (state)
this:
?B' \<in> B \<Longrightarrow> open ?B'

goal (1 subgoal):
 1. \<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'
[PROOF STEP]
with topological_basis_iff assms
[PROOF STATE]
proof (chain)
picking this:
(\<And>B'. B' \<in> ?B \<Longrightarrow> open B') \<Longrightarrow> topological_basis ?B = (\<forall>O'. open O' \<longrightarrow> (\<forall>x\<in>O'. \<exists>B'\<in>?B. x \<in> B' \<and> B' \<subseteq> O'))
topological_basis B
open O'
x \<in> O'
?B' \<in> B \<Longrightarrow> open ?B'
[PROOF STEP]
show  "\<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'"
[PROOF STATE]
proof (prove)
using this:
(\<And>B'. B' \<in> ?B \<Longrightarrow> open B') \<Longrightarrow> topological_basis ?B = (\<forall>O'. open O' \<longrightarrow> (\<forall>x\<in>O'. \<exists>B'\<in>?B. x \<in> B' \<and> B' \<subseteq> O'))
topological_basis B
open O'
x \<in> O'
?B' \<in> B \<Longrightarrow> open ?B'

goal (1 subgoal):
 1. \<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(\<And>B'. B' \<in> ?B \<Longrightarrow> open B') \<Longrightarrow> topological_basis ?B = (\<forall>O'. open O' \<longrightarrow> (\<forall>x\<in>O'. \<exists>B'\<in>?B. x \<in> B' \<and> B' \<subseteq> O'))
topological_basis B
open O'
x \<in> O'
?B' \<in> B \<Longrightarrow> open ?B'
topological_basis B
open O'
x \<in> O'

goal (1 subgoal):
 1. \<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'
[PROOF STEP]
by (simp add: Bex_def)
[PROOF STATE]
proof (state)
this:
\<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'

goal:
No subgoals!
[PROOF STEP]
qed