[STATEMENT]
lemma finite_comm_group_Characters [intro]: "finite_comm_group (Characters G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_comm_group (Characters G)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> carrier (Characters G)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 3. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 5. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 6. carrier (Characters G) \<subseteq> Units (Characters G)
 7. finite (carrier (Characters G))
 8. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
fix \<chi> \<chi>'
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> carrier (Characters G)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 3. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 5. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 6. carrier (Characters G) \<subseteq> Units (Characters G)
 7. finite (carrier (Characters G))
 8. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
assume *: "\<chi> \<in> carrier (Characters G)" "\<chi>' \<in> carrier (Characters G)"
[PROOF STATE]
proof (state)
this:
\<chi> \<in> carrier (Characters G)
\<chi>' \<in> carrier (Characters G)

goal (8 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> carrier (Characters G)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 3. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 5. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 6. carrier (Characters G) \<subseteq> Units (Characters G)
 7. finite (carrier (Characters G))
 8. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<in> carrier (Characters G)
\<chi>' \<in> carrier (Characters G)
[PROOF STEP]
interpret \<chi>: character G \<chi>
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> carrier (Characters G)
\<chi>' \<in> carrier (Characters G)

goal (1 subgoal):
 1. character G \<chi>
[PROOF STEP]
by (simp_all add: characters_def carrier_Characters)
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> carrier (Characters G)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 3. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 5. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 6. carrier (Characters G) \<subseteq> Units (Characters G)
 7. finite (carrier (Characters G))
 8. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<in> carrier (Characters G)
\<chi>' \<in> carrier (Characters G)
[PROOF STEP]
interpret \<chi>': character G \<chi>'
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> carrier (Characters G)
\<chi>' \<in> carrier (Characters G)

goal (1 subgoal):
 1. character G \<chi>'
[PROOF STEP]
by (simp_all add: characters_def  carrier_Characters)
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> carrier (Characters G)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 3. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 5. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 6. carrier (Characters G) \<subseteq> Units (Characters G)
 7. finite (carrier (Characters G))
 8. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
have "character G (\<lambda>k. \<chi> k * \<chi>' k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character G (\<lambda>k. \<chi> k * \<chi>' k)
[PROOF STEP]
by standard (insert *, simp_all add: \<chi>.char_eq_0 one_Characters
                                         mult_Characters characters_def  carrier_Characters)
[PROOF STATE]
proof (state)
this:
character G (\<lambda>k. \<chi> k * \<chi>' k)

goal (8 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<in> carrier (Characters G)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 3. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 5. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 6. carrier (Characters G) \<subseteq> Units (Characters G)
 7. finite (carrier (Characters G))
 8. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
thus "\<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi>' \<in> carrier (Characters G)"
[PROOF STATE]
proof (prove)
using this:
character G (\<lambda>k. \<chi> k * \<chi>' k)

goal (1 subgoal):
 1. \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi>' \<in> carrier (Characters G)
[PROOF STEP]
by (simp add: characters_def one_Characters mult_Characters  carrier_Characters)
[PROOF STATE]
proof (state)
this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi>' \<in> carrier (Characters G)

goal (7 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 5. carrier (Characters G) \<subseteq> Units (Characters G)
 6. finite (carrier (Characters G))
 7. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 5. carrier (Characters G) \<subseteq> Units (Characters G)
 6. finite (carrier (Characters G))
 7. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
have "character G (principal_char G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. character G (principal_char G)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
character G (principal_char G)

goal (7 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 4. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 5. carrier (Characters G) \<subseteq> Units (Characters G)
 6. finite (carrier (Characters G))
 7. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
thus "\<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)"
[PROOF STATE]
proof (prove)
using this:
character G (principal_char G)

goal (1 subgoal):
 1. \<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)
[PROOF STEP]
by (simp add: characters_def one_Characters mult_Characters  carrier_Characters)
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>Characters G\<^esub> \<in> carrier (Characters G)

goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 4. carrier (Characters G) \<subseteq> Units (Characters G)
 5. finite (carrier (Characters G))
 6. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 4. carrier (Characters G) \<subseteq> Units (Characters G)
 5. finite (carrier (Characters G))
 6. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
fix \<chi>
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 4. carrier (Characters G) \<subseteq> Units (Characters G)
 5. finite (carrier (Characters G))
 6. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
assume *: "\<chi> \<in> carrier (Characters G)"
[PROOF STATE]
proof (state)
this:
\<chi> \<in> carrier (Characters G)

goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 4. carrier (Characters G) \<subseteq> Units (Characters G)
 5. finite (carrier (Characters G))
 6. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<in> carrier (Characters G)
[PROOF STEP]
interpret \<chi>: character G \<chi>
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. character G \<chi>
[PROOF STEP]
by (simp_all add: characters_def carrier_Characters)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> x = x
 3. \<And>x. x \<in> carrier (Characters G) \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = x
 4. carrier (Characters G) \<subseteq> Units (Characters G)
 5. finite (carrier (Characters G))
 6. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
show "\<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<chi>" and "\<chi> \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = \<chi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<chi> &&& \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = \<chi>
[PROOF STEP]
by (simp_all add: principal_char_def fun_eq_iff \<chi>.char_eq_0 one_Characters mult_Characters)
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>Characters G\<^esub> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<chi>
\<chi> \<otimes>\<^bsub>Characters G\<^esub> \<one>\<^bsub>Characters G\<^esub> = \<chi>

goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. carrier (Characters G) \<subseteq> Units (Characters G)
 3. finite (carrier (Characters G))
 4. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. carrier (Characters G) \<subseteq> Units (Characters G)
 3. finite (carrier (Characters G))
 4. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
have "\<chi> \<in> Units (Characters G)" if "\<chi> \<in> carrier (Characters G)" for \<chi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<in> carrier (Characters G)
[PROOF STEP]
interpret \<chi>: character G \<chi>
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. character G \<chi>
[PROOF STEP]
by (simp add: characters_def carrier_Characters)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
have "\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>" and
         "inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub> &&& inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>
[PROOF STEP]
by (simp_all add: \<chi>.mult_inv_character mult_ac one_Characters mult_Characters)
[PROOF STATE]
proof (state)
this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>

goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>

goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<in> carrier (Characters G)
[PROOF STEP]
have "inv_character \<chi> \<in> carrier (Characters G)"
[PROOF STATE]
proof (prove)
using this:
\<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. inv_character \<chi> \<in> carrier (Characters G)
[PROOF STEP]
by (simp add: characters_def carrier_Characters)
[PROOF STATE]
proof (state)
this:
inv_character \<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<in> carrier (Characters G)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<in> carrier (Characters G)
\<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. \<chi> \<in> Units (Characters G)
[PROOF STEP]
unfolding Units_def
[PROOF STATE]
proof (prove)
using this:
\<chi> \<otimes>\<^bsub>Characters G\<^esub> inv_character \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<otimes>\<^bsub>Characters G\<^esub> \<chi> = \<one>\<^bsub>Characters G\<^esub>
inv_character \<chi> \<in> carrier (Characters G)
\<chi> \<in> carrier (Characters G)

goal (1 subgoal):
 1. \<chi> \<in> {y \<in> carrier (Characters G). \<exists>x\<in>carrier (Characters G). x \<otimes>\<^bsub>Characters G\<^esub> y = \<one>\<^bsub>Characters G\<^esub> \<and> y \<otimes>\<^bsub>Characters G\<^esub> x = \<one>\<^bsub>Characters G\<^esub>}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<chi> \<in> Units (Characters G)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?\<chi>2 \<in> carrier (Characters G) \<Longrightarrow> ?\<chi>2 \<in> Units (Characters G)

goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. carrier (Characters G) \<subseteq> Units (Characters G)
 3. finite (carrier (Characters G))
 4. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
thus "carrier (Characters G) \<subseteq> Units (Characters G)"
[PROOF STATE]
proof (prove)
using this:
?\<chi>2 \<in> carrier (Characters G) \<Longrightarrow> ?\<chi>2 \<in> Units (Characters G)

goal (1 subgoal):
 1. carrier (Characters G) \<subseteq> Units (Characters G)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
carrier (Characters G) \<subseteq> Units (Characters G)

goal (3 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G); z \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y \<otimes>\<^bsub>Characters G\<^esub> z = x \<otimes>\<^bsub>Characters G\<^esub> (y \<otimes>\<^bsub>Characters G\<^esub> z)
 2. finite (carrier (Characters G))
 3. \<And>x y. \<lbrakk>x \<in> carrier (Characters G); y \<in> carrier (Characters G)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>Characters G\<^esub> y = y \<otimes>\<^bsub>Characters G\<^esub> x
[PROOF STEP]
qed (auto simp: principal_char_def one_Characters mult_Characters carrier_Characters)


[STATEMENT]
lemma usc_imp_limsup:
  fixes f :: "'a::metric_space \<Rightarrow> ereal"
  assumes "usc_at x0 f"
  assumes "x \<longlonglongrightarrow> x0"
  shows "f x0 \<ge> limsup (f \<circ> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (f \<circ> x) \<le> f x0
[PROOF STEP]
using assms usc_limsup[of x0 f]
[PROOF STATE]
proof (prove)
using this:
usc_at x0 f
x \<longlonglongrightarrow> x0
usc_at x0 f = (\<forall>x. x \<longlonglongrightarrow> x0 \<longrightarrow> limsup (f \<circ> x) \<le> f x0)

goal (1 subgoal):
 1. limsup (f \<circ> x) \<le> f x0
[PROOF STEP]
by auto


[STATEMENT]
lemma is_poincare_line_not_trough_zero_is_circle:
  assumes "is_poincare_line l" "0\<^sub>h \<notin> circline_set l"
  shows "is_circle l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_circle l
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_poincare_line l
0\<^sub>h \<notin> circline_set l

goal (1 subgoal):
 1. is_circle l
[PROOF STEP]
using inf_in_circline_set is_poincare_line_not_trough_zero_not_trough_infty
[PROOF STATE]
proof (prove)
using this:
is_poincare_line l
0\<^sub>h \<notin> circline_set l
(\<infinity>\<^sub>h \<in> circline_set ?H) = is_line ?H
\<lbrakk>is_poincare_line ?l; 0\<^sub>h \<notin> circline_set ?l\<rbrakk> \<Longrightarrow> \<infinity>\<^sub>h \<notin> circline_set ?l

goal (1 subgoal):
 1. is_circle l
[PROOF STEP]
by auto


[STATEMENT]
lemma R12_d [simp]: "pmf (sds R12) d = 1 - pmf (sds R12) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf (sds R12) d = 1 - pmf (sds R12) a
[PROOF STEP]
using lottery_conditions[OF R12.wf]
[PROOF STATE]
proof (prove)
using this:
0 \<le> pmf (sds R12) a
0 \<le> pmf (sds R12) b
0 \<le> pmf (sds R12) c
0 \<le> pmf (sds R12) d
pmf (sds R12) a + pmf (sds R12) b + pmf (sds R12) c + pmf (sds R12) d = 1

goal (1 subgoal):
 1. pmf (sds R12) d = 1 - pmf (sds R12) a
[PROOF STEP]
by simp


[STATEMENT]
lemma dg_prod_2_Cod_vdomain[dg_cs_simps]:
  "\<D>\<^sub>\<circ> ((\<AA> \<times>\<^sub>D\<^sub>G \<BB>)\<lparr>Cod\<rparr>) = (\<AA> \<times>\<^sub>D\<^sub>G \<BB>)\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> ((\<AA> \<times>\<^sub>D\<^sub>G \<BB>)\<lparr>Cod\<rparr>) = (\<AA> \<times>\<^sub>D\<^sub>G \<BB>)\<lparr>Arr\<rparr>
[PROOF STEP]
unfolding dg_prod_2_def dg_prod_components
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (\<lambda>f\<in>\<^sub>\<circ>\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. (if i = []\<^sub>\<circ> \<Rightarrow> \<AA> | otherwise \<Rightarrow> \<BB>)\<lparr>Arr\<rparr>. \<lambda>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. (if i = []\<^sub>\<circ> \<Rightarrow> \<AA> | otherwise \<Rightarrow> \<BB>)\<lparr>Cod\<rparr>\<lparr>f\<lparr>i\<rparr>\<rparr>) = (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. (if i = []\<^sub>\<circ> \<Rightarrow> \<AA> | otherwise \<Rightarrow> \<BB>)\<lparr>Arr\<rparr>)
[PROOF STEP]
by simp


[STATEMENT]
lemma enat_add_left_cancel: "a + b = a + c \<longleftrightarrow> a = (\<infinity>::enat) \<or> b = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a + b = a + c) = (a = \<infinity> \<or> b = c)
[PROOF STEP]
unfolding plus_enat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((case a of enat m \<Rightarrow> case b of enat n \<Rightarrow> enat (m + n) | \<infinity> \<Rightarrow> \<infinity> | \<infinity> \<Rightarrow> \<infinity>) = (case a of enat m \<Rightarrow> case c of enat n \<Rightarrow> enat (m + n) | \<infinity> \<Rightarrow> \<infinity> | \<infinity> \<Rightarrow> \<infinity>)) = (a = \<infinity> \<or> b = c)
[PROOF STEP]
by (simp split: enat.split)


[STATEMENT]
lemma in_null_sets_measure_pmfI:
  "A \<inter> set_pmf p = {} \<Longrightarrow> A \<in> null_sets (measure_pmf p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> set_pmf p = {} \<Longrightarrow> A \<in> null_sets (measure_pmf p)
[PROOF STEP]
using emeasure_eq_0_AE[where ?P="\<lambda>x. x \<in> A" and M="measure_pmf p"]
[PROOF STATE]
proof (prove)
using this:
AE x in measure_pmf p. x \<notin> A \<Longrightarrow> emeasure (measure_pmf p) {x \<in> space (measure_pmf p). x \<in> A} = 0

goal (1 subgoal):
 1. A \<inter> set_pmf p = {} \<Longrightarrow> A \<in> null_sets (measure_pmf p)
[PROOF STEP]
by(auto simp add: null_sets_def AE_measure_pmf_iff)


[STATEMENT]
lemma prime_ge_2_nat:
  "p \<ge> 2" if "prime p" for p :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 \<le> p
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 \<le> p
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
prime p
[PROOF STEP]
have "p \<noteq> 0" and "p \<noteq> 1"
[PROOF STATE]
proof (prove)
using this:
prime p

goal (1 subgoal):
 1. p \<noteq> 0 &&& p \<noteq> 1
[PROOF STEP]
by (auto dest: prime_elem_not_zeroI prime_elem_not_unit)
[PROOF STATE]
proof (state)
this:
p \<noteq> 0
p \<noteq> 1

goal (1 subgoal):
 1. 2 \<le> p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p \<noteq> 0
p \<noteq> 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0
p \<noteq> 1

goal (1 subgoal):
 1. 2 \<le> p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
2 \<le> p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma extreme_point_of_Int_supporting_hyperplane_le:
   "\<lbrakk>S \<inter> {x. a \<bullet> x = b} = {c}; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b\<rbrakk> \<Longrightarrow> c extreme_point_of S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S \<inter> {x. a \<bullet> x = b} = {c}; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b\<rbrakk> \<Longrightarrow> c extreme_point_of S
[PROOF STEP]
by (metis convex_singleton face_of_Int_supporting_hyperplane_le_strong face_of_singleton)


[STATEMENT]
lemma transcendental_sin:
  assumes "algebraic z" "z \<noteq> 0"
  shows   "\<not>algebraic (sin z :: complex)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> algebraic (sin z)
[PROOF STEP]
unfolding sin_conv_sinh
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> algebraic (- \<i> * sinh (\<i> * z))
[PROOF STEP]
using transcendental_sinh[of "\<i> * z"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>algebraic (\<i> * z); \<i> * z \<noteq> 0\<rbrakk> \<Longrightarrow> \<not> algebraic (sinh (\<i> * z))
algebraic z
z \<noteq> 0

goal (1 subgoal):
 1. \<not> algebraic (- \<i> * sinh (\<i> * z))
[PROOF STEP]
by simp


[STATEMENT]
lemma reg_union_states:
  "\<Q>\<^sub>r (reg_union A B) = (Inl |`| \<Q>\<^sub>r A) |\<union>| (Inr |`| \<Q>\<^sub>r B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Q>\<^sub>r (reg_union A B) = Inl |`| \<Q>\<^sub>r A |\<union>| Inr |`| \<Q>\<^sub>r B
[PROOF STEP]
by (auto simp: reg_union_def)

\<comment> \<open>Deciding emptiness\<close>


[STATEMENT]
theorem post_delete: "invar t \<Longrightarrow> post_del t (delete x t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invar t \<Longrightarrow> post_del t (delete x t)
[PROOF STEP]
proof (induction t rule: tree2_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
case (Node l a lv r)
[PROOF STATE]
proof (state)
this:
invar l \<Longrightarrow> post_del l (delete x l)
invar r \<Longrightarrow> post_del r (delete x r)
invar \<langle>l, (a, lv), r\<rangle>

goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
let ?l' = "delete x l" and ?r' = "delete x r"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
let ?t = "Node l (a,lv) r"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
let ?t' = "delete x ?t"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
from Node.prems
[PROOF STATE]
proof (chain)
picking this:
invar \<langle>l, (a, lv), r\<rangle>
[PROOF STEP]
have inv_l: "invar l" and inv_r: "invar r"
[PROOF STATE]
proof (prove)
using this:
invar \<langle>l, (a, lv), r\<rangle>

goal (1 subgoal):
 1. invar l &&& invar r
[PROOF STEP]
by (auto)
[PROOF STATE]
proof (state)
this:
invar l
invar r

goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
note post_l' = Node.IH(1)[OF inv_l]
[PROOF STATE]
proof (state)
this:
post_del l (delete x l)

goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
note preL = pre_adj_if_postL[OF Node.prems post_l']
[PROOF STATE]
proof (state)
this:
pre_adjust \<langle>delete x l, (?b, lv), r\<rangle>

goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
note post_r' = Node.IH(2)[OF inv_r]
[PROOF STATE]
proof (state)
this:
post_del r (delete x r)

goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
note preR = pre_adj_if_postR[OF Node.prems post_r']
[PROOF STATE]
proof (state)
this:
pre_adjust \<langle>l, (a, lv), delete x r\<rangle>

goal (2 subgoals):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
 2. \<And>x1 a b x3. \<lbrakk>invar x1 \<Longrightarrow> post_del x1 (delete x x1); invar x3 \<Longrightarrow> post_del x3 (delete x x3); invar \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> post_del \<langle>x1, (a, b), x3\<rangle> (delete x \<langle>x1, (a, b), x3\<rangle>)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
proof (cases rule: linorder_cases[of x a])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. x < a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 3. a < x \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
case less
[PROOF STATE]
proof (state)
this:
x < a

goal (3 subgoals):
 1. x < a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 3. a < x \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x < a

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
using Node.prems
[PROOF STATE]
proof (prove)
using this:
x < a
invar \<langle>l, (a, lv), r\<rangle>

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
by (simp add: post_del_adjL preL)
[PROOF STATE]
proof (state)
this:
post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)

goal (2 subgoals):
 1. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. a < x \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. a < x \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
case greater
[PROOF STATE]
proof (state)
this:
a < x

goal (2 subgoals):
 1. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. a < x \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
a < x

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
using Node.prems
[PROOF STATE]
proof (prove)
using this:
a < x
invar \<langle>l, (a, lv), r\<rangle>

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
by (simp add: post_del_adjR preR post_r')
[PROOF STATE]
proof (state)
this:
post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)

goal (1 subgoal):
 1. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
case equal
[PROOF STATE]
proof (state)
this:
x = a

goal (1 subgoal):
 1. x = a \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. \<not> ?P \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
assume "l = Leaf"
[PROOF STATE]
proof (state)
this:
l = \<langle>\<rangle>

goal (2 subgoals):
 1. ?P \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
 2. \<not> ?P \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
l = \<langle>\<rangle>

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
using equal Node.prems
[PROOF STATE]
proof (prove)
using this:
l = \<langle>\<rangle>
x = a
invar \<langle>l, (a, lv), r\<rangle>

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
by(auto simp: post_del_def invar.simps(2))
[PROOF STATE]
proof (state)
this:
post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)

goal (1 subgoal):
 1. l \<noteq> \<langle>\<rangle> \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. l \<noteq> \<langle>\<rangle> \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
assume "l \<noteq> Leaf"
[PROOF STATE]
proof (state)
this:
l \<noteq> \<langle>\<rangle>

goal (1 subgoal):
 1. l \<noteq> \<langle>\<rangle> \<Longrightarrow> post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
l \<noteq> \<langle>\<rangle>

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
using equal
[PROOF STATE]
proof (prove)
using this:
l \<noteq> \<langle>\<rangle>
x = a

goal (1 subgoal):
 1. post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)
[PROOF STEP]
by simp (metis Node.prems inv_l post_del_adjL post_split_max pre_adj_if_postL)
[PROOF STATE]
proof (state)
this:
post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
post_del \<langle>l, (a, lv), r\<rangle> (delete x \<langle>l, (a, lv), r\<rangle>)

goal (1 subgoal):
 1. invar \<langle>\<rangle> \<Longrightarrow> post_del \<langle>\<rangle> (delete x \<langle>\<rangle>)
[PROOF STEP]
qed (simp add: post_del_def)


[STATEMENT]
lemma fmrel_trancl_fmdom_eq:
  "(fmrel f)\<^sup>+\<^sup>+ xm ym \<Longrightarrow> fmdom xm = fmdom ym"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fmrel f)\<^sup>+\<^sup>+ xm ym \<Longrightarrow> fmdom xm = fmdom ym
[PROOF STEP]
by (induct rule: tranclp_induct; simp add: fmrel_fmdom_eq)


[STATEMENT]
lemma convex_hull_singleton[simp]: "convex hull {a} = {a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex hull {a} = {a}
[PROOF STEP]
by (rule hull_unique) auto


[STATEMENT]
lemma smcf_cn_cov_comp_ObjMap_app[smc_cn_cs_simps]:
    assumes "\<GG> : \<BB> \<^sub>S\<^sub>M\<^sub>C\<mapsto>\<mapsto>\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>" and "a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
  shows "(\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>
[PROOF STEP]
interpret L: is_semifunctor \<alpha> \<open>op_smc \<BB>\<close> \<CC> \<GG>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<GG> : op_smc \<BB> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>
[PROOF STEP]
interpret R: is_semifunctor \<alpha> \<AA> \<BB> \<FF>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (rule assms(2))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>
[PROOF STEP]
by
      (
        rule dghm_cn_cov_comp_ObjMap_app
          [
            OF
              L.smcf_is_dghm[unfolded slicing_commute[symmetric]]
              R.smcf_is_dghm,
            unfolded slicing_commute slicing_simps,
            OF assms(3)
          ]
      )
[PROOF STATE]
proof (state)
this:
(\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> = \<GG>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nth_of_radiant_1 [simp]:
  "of_radiant \<omega> $ 1 = cos \<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_radiant \<omega> $ 1 = cos \<omega>
[PROOF STEP]
unfolding of_radiant_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (axis 1 (cos \<omega>) + axis 2 (sin \<omega>)) $ 1 = cos \<omega>
[PROOF STEP]
by simp


[STATEMENT]
lemma subtopology_eq_discrete_topology_eq:
   "subtopology X U = discrete_topology U \<longleftrightarrow> U \<subseteq> topspace X \<and> U \<inter> X derived_set_of U = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (subtopology X U = discrete_topology U) = (U \<subseteq> topspace X \<and> U \<inter> X derived_set_of U = {})
[PROOF STEP]
using discrete_topology_unique_derived_set [of U "subtopology X U"]
[PROOF STATE]
proof (prove)
using this:
(discrete_topology U = subtopology X U) = (topspace (subtopology X U) = U \<and> subtopology X U derived_set_of U = {})

goal (1 subgoal):
 1. (subtopology X U = discrete_topology U) = (U \<subseteq> topspace X \<and> U \<inter> X derived_set_of U = {})
[PROOF STEP]
by (auto simp: eq_commute derived_set_of_subtopology)


[STATEMENT]
lemma nth_subdegree_mult_right [simp]:
  fixes f g :: "('a :: {mult_zero,comm_monoid_add}) fps"
  shows "(f * g) $ (subdegree g) = f $ 0 * g $ subdegree g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f * g) $ subdegree g = f $ 0 * g $ subdegree g
[PROOF STEP]
by    (cases "subdegree g") (simp_all add: fps_mult_nth nth_less_subdegree_zero sum.atLeast_Suc_atMost)


[STATEMENT]
lemma lemma_exp_total: "1 \<le> y \<Longrightarrow> \<exists>x. 0 \<le> x \<and> x \<le> y - 1 \<and> exp x = y"
  for y :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> y \<Longrightarrow> \<exists>x\<ge>0. x \<le> y - 1 \<and> exp x = y
[PROOF STEP]
proof (rule IVT)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. 1 \<le> y \<Longrightarrow> exp 0 \<le> y
 2. 1 \<le> y \<Longrightarrow> y \<le> exp (y - 1)
 3. 1 \<le> y \<Longrightarrow> 0 \<le> y - 1
 4. 1 \<le> y \<Longrightarrow> \<forall>x. 0 \<le> x \<and> x \<le> y - 1 \<longrightarrow> isCont exp x
[PROOF STEP]
assume "1 \<le> y"
[PROOF STATE]
proof (state)
this:
1 \<le> y

goal (4 subgoals):
 1. 1 \<le> y \<Longrightarrow> exp 0 \<le> y
 2. 1 \<le> y \<Longrightarrow> y \<le> exp (y - 1)
 3. 1 \<le> y \<Longrightarrow> 0 \<le> y - 1
 4. 1 \<le> y \<Longrightarrow> \<forall>x. 0 \<le> x \<and> x \<le> y - 1 \<longrightarrow> isCont exp x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 \<le> y
[PROOF STEP]
have "0 \<le> y - 1"
[PROOF STATE]
proof (prove)
using this:
1 \<le> y

goal (1 subgoal):
 1. 0 \<le> y - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> y - 1

goal (4 subgoals):
 1. 1 \<le> y \<Longrightarrow> exp 0 \<le> y
 2. 1 \<le> y \<Longrightarrow> y \<le> exp (y - 1)
 3. 1 \<le> y \<Longrightarrow> 0 \<le> y - 1
 4. 1 \<le> y \<Longrightarrow> \<forall>x. 0 \<le> x \<and> x \<le> y - 1 \<longrightarrow> isCont exp x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> y - 1
[PROOF STEP]
have "1 + (y - 1) \<le> exp (y - 1)"
[PROOF STATE]
proof (prove)
using this:
0 \<le> y - 1

goal (1 subgoal):
 1. 1 + (y - 1) \<le> exp (y - 1)
[PROOF STEP]
by (rule exp_ge_add_one_self_aux)
[PROOF STATE]
proof (state)
this:
1 + (y - 1) \<le> exp (y - 1)

goal (4 subgoals):
 1. 1 \<le> y \<Longrightarrow> exp 0 \<le> y
 2. 1 \<le> y \<Longrightarrow> y \<le> exp (y - 1)
 3. 1 \<le> y \<Longrightarrow> 0 \<le> y - 1
 4. 1 \<le> y \<Longrightarrow> \<forall>x. 0 \<le> x \<and> x \<le> y - 1 \<longrightarrow> isCont exp x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 + (y - 1) \<le> exp (y - 1)
[PROOF STEP]
show "y \<le> exp (y - 1)"
[PROOF STATE]
proof (prove)
using this:
1 + (y - 1) \<le> exp (y - 1)

goal (1 subgoal):
 1. y \<le> exp (y - 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y \<le> exp (y - 1)

goal (3 subgoals):
 1. 1 \<le> y \<Longrightarrow> exp 0 \<le> y
 2. 1 \<le> y \<Longrightarrow> 0 \<le> y - 1
 3. 1 \<le> y \<Longrightarrow> \<forall>x. 0 \<le> x \<and> x \<le> y - 1 \<longrightarrow> isCont exp x
[PROOF STEP]
qed (simp_all add: le_diff_eq)


[STATEMENT]
lemma length_nths_even:
assumes "even (length xs)"
shows "length (nths xs (Collect even)) = length (nths xs (Collect odd))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
even (length xs)

goal (1 subgoal):
 1. length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
proof (induction "length xs div 2" arbitrary:xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xs. \<lbrakk>0 = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
 2. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
0 = length xs div 2
even (length xs)

goal (2 subgoals):
 1. \<And>xs. \<lbrakk>0 = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
 2. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 = length xs div 2
even (length xs)
[PROOF STEP]
have "length xs = 0"
[PROOF STATE]
proof (prove)
using this:
0 = length xs div 2
even (length xs)

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

goal (2 subgoals):
 1. \<And>xs. \<lbrakk>0 = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
 2. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length xs = 0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length xs = 0

goal (1 subgoal):
 1. length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (nths xs (Collect even)) = length (nths xs {a. odd a})

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
case (Suc l xs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>l = length ?xs div 2; even (length ?xs)\<rbrakk> \<Longrightarrow> length (nths ?xs (Collect even)) = length (nths ?xs {a. odd a})
Suc l = length xs div 2
even (length xs)

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>l = length ?xs div 2; even (length ?xs)\<rbrakk> \<Longrightarrow> length (nths ?xs (Collect even)) = length (nths ?xs {a. odd a})
Suc l = length xs div 2
even (length xs)
[PROOF STEP]
have length_drop2: "length (nths (drop 2 xs) (Collect even)) = length (nths (drop 2 xs) {a. odd a})"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>l = length ?xs div 2; even (length ?xs)\<rbrakk> \<Longrightarrow> length (nths ?xs (Collect even)) = length (nths ?xs {a. odd a})
Suc l = length xs div 2
even (length xs)

goal (1 subgoal):
 1. length (nths (drop 2 xs) (Collect even)) = length (nths (drop 2 xs) {a. odd a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (nths (drop 2 xs) (Collect even)) = length (nths (drop 2 xs) {a. odd a})

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
have "length (take 2 xs) = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (take 2 xs) = 2
[PROOF STEP]
using Suc.hyps(2)
[PROOF STATE]
proof (prove)
using this:
Suc l = length xs div 2

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

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length (take 2 xs) = 2
[PROOF STEP]
have plus_odd: "{j. j + length (take 2 xs) \<in> Collect odd} = Collect odd" and
            plus_even: "{j. j + length (take 2 xs) \<in> Collect even} = Collect even"
[PROOF STATE]
proof (prove)
using this:
length (take 2 xs) = 2

goal (1 subgoal):
 1. {j. j + length (take 2 xs) \<in> {a. odd a}} = {a. odd a} &&& {j. j + length (take 2 xs) \<in> Collect even} = Collect even
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
{j. j + length (take 2 xs) \<in> {a. odd a}} = {a. odd a}
{j. j + length (take 2 xs) \<in> Collect even} = Collect even

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
have nths_take2: "nths (take 2 xs) (Collect even) = [take 2 xs ! 0]" "nths (take 2 xs) (Collect odd) = [take 2 xs ! 1]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nths (take 2 xs) (Collect even) = [take 2 xs ! 0] &&& nths (take 2 xs) {a. odd a} = [take 2 xs ! 1]
[PROOF STEP]
using \<open>length (take 2 xs) = 2\<close> less_2_cases nths_only_one[of "take 2 xs" "Collect even" 0]
    nths_only_one[of "take 2 xs" "Collect odd" 1]
[PROOF STATE]
proof (prove)
using this:
length (take 2 xs) = 2
?n < 2 \<Longrightarrow> ?n = 0 \<or> ?n = Suc 0
{i. i < length (take 2 xs) \<and> i \<in> Collect even} = {0} \<Longrightarrow> nths (take 2 xs) (Collect even) = [take 2 xs ! 0]
{i. i < length (take 2 xs) \<and> i \<in> {a. odd a}} = {1} \<Longrightarrow> nths (take 2 xs) {a. odd a} = [take 2 xs ! 1]

goal (1 subgoal):
 1. nths (take 2 xs) (Collect even) = [take 2 xs ! 0] &&& nths (take 2 xs) {a. odd a} = [take 2 xs ! 1]
[PROOF STEP]
by fastforce+
[PROOF STATE]
proof (state)
this:
nths (take 2 xs) (Collect even) = [take 2 xs ! 0]
nths (take 2 xs) {a. odd a} = [take 2 xs ! 1]

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
nths (take 2 xs) (Collect even) = [take 2 xs ! 0]
nths (take 2 xs) {a. odd a} = [take 2 xs ! 1]
[PROOF STEP]
have "length (nths (take 2 xs @ drop 2 xs) (Collect even))
           = length (nths (take 2 xs @ drop 2 xs) {a. odd a})"
[PROOF STATE]
proof (prove)
using this:
nths (take 2 xs) (Collect even) = [take 2 xs ! 0]
nths (take 2 xs) {a. odd a} = [take 2 xs ! 1]

goal (1 subgoal):
 1. length (nths (take 2 xs @ drop 2 xs) (Collect even)) = length (nths (take 2 xs @ drop 2 xs) {a. odd a})
[PROOF STEP]
unfolding nths_append length_append plus_odd plus_even nths_take2 length_drop2
[PROOF STATE]
proof (prove)
using this:
[take 2 xs ! 0] = [take 2 xs ! 0]
[take 2 xs ! 1] = [take 2 xs ! 1]

goal (1 subgoal):
 1. length [take 2 xs ! 0] + length (nths (drop 2 xs) {a. odd a}) = length [take 2 xs ! 1] + length (nths (drop 2 xs) {a. odd a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length (nths (take 2 xs @ drop 2 xs) (Collect even)) = length (nths (take 2 xs @ drop 2 xs) {a. odd a})

goal (1 subgoal):
 1. \<And>x xs. \<lbrakk>\<And>xs. \<lbrakk>x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a}); Suc x = length xs div 2; even (length xs)\<rbrakk> \<Longrightarrow> length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length (nths (take 2 xs @ drop 2 xs) (Collect even)) = length (nths (take 2 xs @ drop 2 xs) {a. odd a})
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length (nths (take 2 xs @ drop 2 xs) (Collect even)) = length (nths (take 2 xs @ drop 2 xs) {a. odd a})

goal (1 subgoal):
 1. length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
using append_take_drop_id[of 2 xs]
[PROOF STATE]
proof (prove)
using this:
length (nths (take 2 xs @ drop 2 xs) (Collect even)) = length (nths (take 2 xs @ drop 2 xs) {a. odd a})
take 2 xs @ drop 2 xs = xs

goal (1 subgoal):
 1. length (nths xs (Collect even)) = length (nths xs {a. odd a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (nths xs (Collect even)) = length (nths xs {a. odd a})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma after_summary_nonneg: "(\<And>t. 0 \<le> zcount M t) \<Longrightarrow> 0 \<le> zcount (after_summary M S) t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t. 0 \<le> zcount M t) \<Longrightarrow> 0 \<le> zcount (after_summary M S) t
[PROOF STEP]
by (auto simp: zcount_sum after_summary_def intro: sum_nonneg)


[STATEMENT]
lemma bl_sshiftr1: "to_bl (sshiftr1 w) = hd (to_bl w) # butlast (to_bl w)"
  for w :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_bl (sshiftr1 w) = hd (to_bl w) # butlast (to_bl w)
[PROOF STEP]
proof (rule nth_equalityI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. length (to_bl (sshiftr1 w)) = length (hd (to_bl w) # butlast (to_bl w))
 2. \<And>i. i < length (to_bl (sshiftr1 w)) \<Longrightarrow> to_bl (sshiftr1 w) ! i = (hd (to_bl w) # butlast (to_bl w)) ! i
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. length (to_bl (sshiftr1 w)) = length (hd (to_bl w) # butlast (to_bl w))
 2. \<And>i. i < length (to_bl (sshiftr1 w)) \<Longrightarrow> to_bl (sshiftr1 w) ! i = (hd (to_bl w) # butlast (to_bl w)) ! i
[PROOF STEP]
assume \<open>n < length (to_bl (sshiftr1 w))\<close>
[PROOF STATE]
proof (state)
this:
n < length (to_bl (sshiftr1 w))

goal (2 subgoals):
 1. length (to_bl (sshiftr1 w)) = length (hd (to_bl w) # butlast (to_bl w))
 2. \<And>i. i < length (to_bl (sshiftr1 w)) \<Longrightarrow> to_bl (sshiftr1 w) ! i = (hd (to_bl w) # butlast (to_bl w)) ! i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n < length (to_bl (sshiftr1 w))
[PROOF STEP]
have \<open>n < LENGTH('a)\<close>
[PROOF STATE]
proof (prove)
using this:
n < length (to_bl (sshiftr1 w))

goal (1 subgoal):
 1. n < LENGTH('a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
n < LENGTH('a)

goal (2 subgoals):
 1. length (to_bl (sshiftr1 w)) = length (hd (to_bl w) # butlast (to_bl w))
 2. \<And>i. i < length (to_bl (sshiftr1 w)) \<Longrightarrow> to_bl (sshiftr1 w) ! i = (hd (to_bl w) # butlast (to_bl w)) ! i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n < LENGTH('a)
[PROOF STEP]
show \<open>to_bl (sshiftr1 w) ! n \<longleftrightarrow> (hd (to_bl w) # butlast (to_bl w)) ! n\<close>
[PROOF STATE]
proof (prove)
using this:
n < LENGTH('a)

goal (1 subgoal):
 1. to_bl (sshiftr1 w) ! n = (hd (to_bl w) # butlast (to_bl w)) ! n
[PROOF STEP]
apply (cases n)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>n < LENGTH('a); n = 0\<rbrakk> \<Longrightarrow> to_bl (sshiftr1 w) ! n = (hd (to_bl w) # butlast (to_bl w)) ! n
 2. \<And>nat. \<lbrakk>n < LENGTH('a); n = Suc nat\<rbrakk> \<Longrightarrow> to_bl (sshiftr1 w) ! n = (hd (to_bl w) # butlast (to_bl w)) ! n
[PROOF STEP]
apply (simp_all add: to_bl_nth word_size hd_conv_nth bit_sshiftr1_iff nth_butlast Suc_diff_Suc nth_to_bl)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
to_bl (sshiftr1 w) ! n = (hd (to_bl w) # butlast (to_bl w)) ! n

goal (1 subgoal):
 1. length (to_bl (sshiftr1 w)) = length (hd (to_bl w) # butlast (to_bl w))
[PROOF STEP]
qed simp


[STATEMENT]
lemma bulk_update_account_mono:
  assumes "0 \<le> i"
  and "\<forall> n . \<rho> n < 1"
  and "\<forall> n m . n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m"
  and "\<alpha> \<le> \<beta>"
  shows "bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>

goal (1 subgoal):
 1. bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account 0 \<rho> i \<alpha> \<le> bulk_update_account 0 \<rho> i \<beta>
 2. \<And>n. \<lbrakk>\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>; 0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>

goal (2 subgoals):
 1. \<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account 0 \<rho> i \<alpha> \<le> bulk_update_account 0 \<rho> i \<beta>
 2. \<And>n. \<lbrakk>\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>; 0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>

goal (1 subgoal):
 1. bulk_update_account 0 \<rho> i \<alpha> \<le> bulk_update_account 0 \<rho> i \<beta>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
bulk_update_account 0 \<rho> i \<alpha> \<le> bulk_update_account 0 \<rho> i \<beta>

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>; 0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>; 0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>; 0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>

goal (1 subgoal):
 1. bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
using bulk_update_account.simps(2) update_account_mono
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> i; \<forall>n. \<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m; \<alpha> \<le> \<beta>\<rbrakk> \<Longrightarrow> bulk_update_account n \<rho> i \<alpha> \<le> bulk_update_account n \<rho> i \<beta>
0 \<le> i
\<forall>n. \<rho> n < 1
\<forall>n m. n \<le> m \<longrightarrow> \<rho> n \<le> \<rho> m
\<alpha> \<le> \<beta>
bulk_update_account (Suc ?n) ?\<rho> ?i ?\<alpha> = update_account ?\<rho> ?i (bulk_update_account ?n ?\<rho> ?i ?\<alpha>)
\<lbrakk>0 \<le> ?i; \<forall>n. ?\<rho> n < 1; \<forall>n m. n \<le> m \<longrightarrow> ?\<rho> n \<le> ?\<rho> m; ?\<alpha> \<le> ?\<beta>\<rbrakk> \<Longrightarrow> update_account ?\<rho> ?i ?\<alpha> \<le> update_account ?\<rho> ?i ?\<beta>

goal (1 subgoal):
 1. bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
bulk_update_account (Suc n) \<rho> i \<alpha> \<le> bulk_update_account (Suc n) \<rho> i \<beta>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma empty_eq_affine_hull[simp]: "{} = affine hull S \<longleftrightarrow> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({} = affine hull S) = (S = {})
[PROOF STEP]
by (metis affine_hull_eq_empty)


[STATEMENT]
lemma mu_roll:
  assumes "isotone g"
      and "has_least_fixpoint (f \<circ> g)"
      and "has_least_fixpoint (g \<circ> f)"
    shows "\<mu> (g \<circ> f) = g (\<mu> (f \<circ> g))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<mu> (g \<circ> f) = g (\<mu> (f \<circ> g))
[PROOF STEP]
proof (rule order.antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<mu> (g \<circ> f) \<le> g (\<mu> (f \<circ> g))
 2. g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)
[PROOF STEP]
show "\<mu> (g \<circ> f) \<le> g (\<mu> (f \<circ> g))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<mu> (g \<circ> f) \<le> g (\<mu> (f \<circ> g))
[PROOF STEP]
by (metis assms(2-3) comp_apply is_least_fixpoint_def least_fixpoint)
[PROOF STATE]
proof (state)
this:
\<mu> (g \<circ> f) \<le> g (\<mu> (f \<circ> g))

goal (1 subgoal):
 1. g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)
[PROOF STEP]
have "is_least_fixpoint (g \<circ> f) (\<mu> (g \<circ> f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_least_fixpoint (g \<circ> f) (\<mu> (g \<circ> f))
[PROOF STEP]
by (simp add: assms(3) least_fixpoint)
[PROOF STATE]
proof (state)
this:
is_least_fixpoint (g \<circ> f) (\<mu> (g \<circ> f))

goal (1 subgoal):
 1. g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)
[PROOF STEP]
thus "g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)"
[PROOF STATE]
proof (prove)
using this:
is_least_fixpoint (g \<circ> f) (\<mu> (g \<circ> f))

goal (1 subgoal):
 1. g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)
[PROOF STEP]
by (metis (no_types) assms(1-2) comp_def is_least_fixpoint_def least_fixpoint isotone_def)
[PROOF STATE]
proof (state)
this:
g (\<mu> (f \<circ> g)) \<le> \<mu> (g \<circ> f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma paths_edge_finite: "finite (\<Union>(edges_of_walk ` paths))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (\<Union> (edges_of_walk ` paths))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite (\<Union> (edges_of_walk ` paths))
[PROOF STEP]
have "\<Union>(edges_of_walk ` paths) \<subseteq> E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (edges_of_walk ` paths) \<subseteq> E
[PROOF STEP]
using edges_of_walk_in_E paths
[PROOF STATE]
proof (prove)
using this:
walk ?xs \<Longrightarrow> edges_of_walk ?xs \<subseteq> E
?xs \<in> paths \<Longrightarrow> v0 \<leadsto>?xs\<leadsto> v1

goal (1 subgoal):
 1. \<Union> (edges_of_walk ` paths) \<subseteq> E
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<Union> (edges_of_walk ` paths) \<subseteq> E

goal (1 subgoal):
 1. finite (\<Union> (edges_of_walk ` paths))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> (edges_of_walk ` paths) \<subseteq> E
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Union> (edges_of_walk ` paths) \<subseteq> E

goal (1 subgoal):
 1. finite (\<Union> (edges_of_walk ` paths))
[PROOF STEP]
by (meson finite_edge_set finite_subset)
[PROOF STATE]
proof (state)
this:
finite (\<Union> (edges_of_walk ` paths))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma BMax_rec_eq1:
  "BMax_rec R x = (GREATEST z. (R z \<and> z \<le> x) \<or> z = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. BMax_rec R x = (GREATEST z. R z \<and> z \<le> x \<or> z = 0)
[PROOF STEP]
apply(induct x)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. BMax_rec R 0 = (GREATEST z. R z \<and> z \<le> 0 \<or> z = 0)
 2. \<And>x. BMax_rec R x = (GREATEST z. R z \<and> z \<le> x \<or> z = 0) \<Longrightarrow> BMax_rec R (Suc x) = (GREATEST z. R z \<and> z \<le> Suc x \<or> z = 0)
[PROOF STEP]
apply(auto intro: Greatest_equality Greatest_equality[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>BMax_rec R x = (GREATEST z. R z \<and> z \<le> x \<or> z = 0); \<not> R (Suc x)\<rbrakk> \<Longrightarrow> (GREATEST z. R z \<and> z \<le> x \<or> z = 0) = (GREATEST z. R z \<and> z \<le> Suc x \<or> z = 0)
[PROOF STEP]
apply(simp add: le_Suc_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>BMax_rec R x = (GREATEST z. R z \<and> z \<le> x \<or> z = 0); \<not> R (Suc x)\<rbrakk> \<Longrightarrow> (GREATEST z. R z \<and> z \<le> x \<or> z = 0) = (GREATEST z. R z \<and> (z \<le> x \<or> z = Suc x) \<or> z = 0)
[PROOF STEP]
by metis


[STATEMENT]
lemma space_C:
  "x \<in> space (PiM {0..<n} M) \<Longrightarrow> space (C n m x) = space (PiM {0..<n + m} M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> space (Pi\<^sub>M {0..<n} M) \<Longrightarrow> space (C n m x) = space (Pi\<^sub>M {0..<n + m} M)
[PROOF STEP]
by (simp add: measurable_C[THEN subprob_measurableD(1)])


[STATEMENT]
lemma finite_equiv:
  assumes "finite A"
  shows "finite {R. equiv A R}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {R. equiv A R}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {R. equiv A R}
[PROOF STEP]
have "bij_betw (\<lambda>R. A // R) {R. equiv A R} {P. partition_on A P}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw ((//) A) {R. equiv A R} {P. partition_on A P}
[PROOF STEP]
by (rule bij_betw_partition_of)
[PROOF STATE]
proof (state)
this:
bij_betw ((//) A) {R. equiv A R} {P. partition_on A P}

goal (1 subgoal):
 1. finite {R. equiv A R}
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
bij_betw ((//) A) {R. equiv A R} {P. partition_on A P}
[PROOF STEP]
show "finite {R. equiv A R}"
[PROOF STATE]
proof (prove)
using this:
bij_betw ((//) A) {R. equiv A R} {P. partition_on A P}

goal (1 subgoal):
 1. finite {R. equiv A R}
[PROOF STEP]
using \<open>finite A\<close> finitely_many_partition_on
[PROOF STATE]
proof (prove)
using this:
bij_betw ((//) A) {R. equiv A R} {P. partition_on A P}
finite A
finite ?A \<Longrightarrow> finite {P. partition_on ?A P}

goal (1 subgoal):
 1. finite {R. equiv A R}
[PROOF STEP]
by (simp add: bij_betw_finite)
[PROOF STATE]
proof (state)
this:
finite {R. equiv A R}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inv_baliR: "\<lbrakk> invh l; invh r; invc l; invc2 r; bheight l = bheight r \<rbrakk>
 \<Longrightarrow> invc (baliR l a r) \<and> invh (baliR l a r) \<and> bheight (baliR l a r) = Suc (bheight l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>invh l; invh r; invc l; invc2 r; bheight l = bheight r\<rbrakk> \<Longrightarrow> invc (baliR l a r) \<and> invh (baliR l a r) \<and> bheight (baliR l a r) = Suc (bheight l)
[PROOF STEP]
by (induct l a r rule: baliR.induct) auto


[STATEMENT]
lemma prod_list_split:
  fixes xs::"real list"
  shows "\<Prod>:xs = (\<Prod>:(list_neq xs m) * \<Prod>:(list_eq xs m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod_list xs = prod_list (list_neq xs m) * prod_list (list_eq xs m)
[PROOF STEP]
apply (induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. prod_list [] = prod_list (list_neq [] m) * prod_list (list_eq [] m)
 2. \<And>a xs. prod_list xs = prod_list (list_neq xs m) * prod_list (list_eq xs m) \<Longrightarrow> prod_list (a # xs) = prod_list (list_neq (a # xs) m) * prod_list (list_eq (a # xs) m)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs. prod_list xs = prod_list (list_neq xs m) * prod_list (list_eq xs m) \<Longrightarrow> prod_list (a # xs) = prod_list (list_neq (a # xs) m) * prod_list (list_eq (a # xs) m)
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma homotopy_eqv_empty2 [simp]:
  fixes S :: "'a::real_normed_vector set"
  shows "({}::'b::real_normed_vector set) homotopy_eqv S \<longleftrightarrow> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({} homotopy_eqv S) = (S = {})
[PROOF STEP]
using homotopy_equivalent_space_sym homotopy_eqv_empty1
[PROOF STATE]
proof (prove)
using this:
(?X homotopy_equivalent_space ?Y) = (?Y homotopy_equivalent_space ?X)
(?S homotopy_eqv {}) = (?S = {})

goal (1 subgoal):
 1. ({} homotopy_eqv S) = (S = {})
[PROOF STEP]
by blast


[STATEMENT]
lemma ring_hom_add:
  fixes R (structure) and S (structure)
  shows "\<lbrakk> h \<in> ring_hom R S; x \<in> carrier R; y \<in> carrier R \<rbrakk> \<Longrightarrow> h (x \<oplus> y) = h x \<oplus>\<^bsub>S\<^esub> h y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>h \<in> ring_hom R S; x \<in> carrier R; y \<in> carrier R\<rbrakk> \<Longrightarrow> h (x \<oplus> y) = h x \<oplus>\<^bsub>S\<^esub> h y
[PROOF STEP]
by (simp add: ring_hom_def)


[STATEMENT]
lemma (in cpx_sq_mat) sum_over_spectrum':
  assumes "A\<in> fc_mats"
and "hermitian A"
and "make_pm A = (p, M)"
shows "(\<Sum> y \<in> {Re x|x. x \<in> spectrum A}. f y) =  (\<Sum> i < p. f (meas_outcome_val (M i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f {Re x |x. x \<in> spectrum A} = (\<Sum>i<p. f (meas_outcome_val (M i)))
[PROOF STEP]
proof (rule sum.reindex_cong)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. inj_on ?l {..<p}
 2. {Re x |x. x \<in> spectrum A} = ?l ` {..<p}
 3. \<And>x. x \<in> {..<p} \<Longrightarrow> f (?l x) = f (meas_outcome_val (M x))
[PROOF STEP]
show "{Re x|x. x \<in> spectrum A} =(\<lambda>x. (meas_outcome_val (M x)))` {..< p}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {Re x |x. x \<in> spectrum A} = (\<lambda>x. meas_outcome_val (M x)) ` {..<p}
[PROOF STEP]
using spectrum_meas_outcome_val_eq' assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>hermitian ?A; ?A \<in> fc_mats; make_pm ?A = (?p, ?M)\<rbrakk> \<Longrightarrow> {Re x |x. x \<in> spectrum ?A} = (\<lambda>i. meas_outcome_val (?M i)) ` {..<?p}
A \<in> fc_mats
hermitian A
make_pm A = (p, M)

goal (1 subgoal):
 1. {Re x |x. x \<in> spectrum A} = (\<lambda>x. meas_outcome_val (M x)) ` {..<p}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
{Re x |x. x \<in> spectrum A} = (\<lambda>x. meas_outcome_val (M x)) ` {..<p}

goal (2 subgoals):
 1. inj_on (\<lambda>x. meas_outcome_val (M x)) {..<p}
 2. \<And>x. x \<in> {..<p} \<Longrightarrow> f (meas_outcome_val (M x)) = f (meas_outcome_val (M x))
[PROOF STEP]
show "inj_on (\<lambda>x. (meas_outcome_val (M x))) {..<p}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>x. meas_outcome_val (M x)) {..<p}
[PROOF STEP]
using make_pm_proj_measurement[of A p M]
        assms proj_measurement_inj
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>A \<in> fc_mats; hermitian A; make_pm A = (p, M)\<rbrakk> \<Longrightarrow> proj_measurement p M
A \<in> fc_mats
hermitian A
make_pm A = (p, M)
proj_measurement ?p ?M \<Longrightarrow> inj_on (\<lambda>i. meas_outcome_val (?M i)) {..<?p}

goal (1 subgoal):
 1. inj_on (\<lambda>x. meas_outcome_val (M x)) {..<p}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. meas_outcome_val (M x)) {..<p}

goal (1 subgoal):
 1. \<And>x. x \<in> {..<p} \<Longrightarrow> f (meas_outcome_val (M x)) = f (meas_outcome_val (M x))
[PROOF STEP]
qed simp


[STATEMENT]
lemma dim_vec_conjugate[simp]: "dim_vec (conjugate v) = dim_vec v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (conjugate v) = dim_vec v
[PROOF STEP]
unfolding conjugate_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (vec (dim_vec v) (\<lambda>i. conjugate (v $ i))) = dim_vec v
[PROOF STEP]
by auto


[STATEMENT]
lemma multiplicity_one_nat [simp]: "multiplicity p (Suc 0) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity p (Suc 0) = 0
[PROOF STEP]
unfolding One_nat_def [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity p 1 = 0
[PROOF STEP]
by (rule multiplicity_one)


[STATEMENT]
lemma orthogonal_complement_mono:
  assumes A_in_B: "A \<subseteq> B"
  shows "orthogonal_complement B \<subseteq> orthogonal_complement A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_complement B \<subseteq> orthogonal_complement A
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> orthogonal_complement B \<Longrightarrow> x \<in> orthogonal_complement A
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> orthogonal_complement B \<Longrightarrow> x \<in> orthogonal_complement A
[PROOF STEP]
assume x: "x \<in> orthogonal_complement B"
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement B

goal (1 subgoal):
 1. \<And>x. x \<in> orthogonal_complement B \<Longrightarrow> x \<in> orthogonal_complement A
[PROOF STEP]
show "x \<in> orthogonal_complement A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> orthogonal_complement A
[PROOF STEP]
using x
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement B

goal (1 subgoal):
 1. x \<in> orthogonal_complement A
[PROOF STEP]
unfolding orthogonal_complement_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {x. \<forall>y\<in>B. orthogonal y x}

goal (1 subgoal):
 1. x \<in> {x. \<forall>y\<in>A. orthogonal y x}
[PROOF STEP]
by (simp add: orthogonal_def, metis A_in_B in_mono)
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma quasi_inverses_isomorphic_left:
    assumes "quasi_inverses f g"
    shows "quasi_inverses f' g \<longleftrightarrow> f \<cong> f'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. quasi_inverses f' g = (f \<cong> f')
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. quasi_inverses f' g \<Longrightarrow> f \<cong> f'
 2. f \<cong> f' \<Longrightarrow> quasi_inverses f' g
[PROOF STEP]
show "f \<cong> f' \<Longrightarrow> quasi_inverses f' g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<cong> f' \<Longrightarrow> quasi_inverses f' g
[PROOF STEP]
using assms quasi_inverses_def isomorphic_def equivalence_preserved_by_iso_left
[PROOF STATE]
proof (prove)
using this:
quasi_inverses f g
quasi_inverses ?f ?g \<equiv> \<exists>\<phi> \<psi>. internal_equivalence ?f ?g \<phi> \<psi>
(?a \<cong> ?a') = (\<exists>f. \<guillemotleft>f : ?a \<Rightarrow> ?a'\<guillemotright> \<and> local.iso f)
\<lbrakk>internal_equivalence ?f ?g ?\<eta> ?\<epsilon>; \<guillemotleft>?\<phi> : ?f \<Rightarrow> ?f'\<guillemotright>; local.iso ?\<phi>\<rbrakk> \<Longrightarrow> internal_equivalence ?f' ?g ((?g \<star> ?\<phi>) \<cdot> ?\<eta>) (?\<epsilon> \<cdot> (local.inv ?\<phi> \<star> ?g))

goal (1 subgoal):
 1. f \<cong> f' \<Longrightarrow> quasi_inverses f' g
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
f \<cong> f' \<Longrightarrow> quasi_inverses f' g

goal (1 subgoal):
 1. quasi_inverses f' g \<Longrightarrow> f \<cong> f'
[PROOF STEP]
assume f': "quasi_inverses f' g"
[PROOF STATE]
proof (state)
this:
quasi_inverses f' g

goal (1 subgoal):
 1. quasi_inverses f' g \<Longrightarrow> f \<cong> f'
[PROOF STEP]
show "f \<cong> f'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<cong> f'
[PROOF STEP]
using assms f' quasi_inverses_are_adjoint_pair right_adjoint_determines_left_up_to_iso
[PROOF STATE]
proof (prove)
using this:
quasi_inverses f g
quasi_inverses f' g
quasi_inverses ?f ?g \<Longrightarrow> adjoint_pair ?f ?g
\<lbrakk>adjoint_pair ?f ?g; adjoint_pair ?f' ?g\<rbrakk> \<Longrightarrow> ?f \<cong> ?f'

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma weak_sup_pre_fixed_point:
  assumes "f \<in> carrier L \<rightarrow> carrier L" "isotone L L f" "A \<subseteq> fps L f"
  shows "(\<Squnion>\<^bsub>L\<^esub> A) \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion>A \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
proof (rule sup_least)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. A \<subseteq> carrier L
 2. f (\<Squnion>A) \<in> carrier L
 3. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
from assms(3)
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> fps L f
[PROOF STEP]
show AL: "A \<subseteq> carrier L"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> fps L f

goal (1 subgoal):
 1. A \<subseteq> carrier L
[PROOF STEP]
by (auto simp add: fps_def)
[PROOF STATE]
proof (state)
this:
A \<subseteq> carrier L

goal (2 subgoals):
 1. f (\<Squnion>A) \<in> carrier L
 2. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
thus fA: "f (\<Squnion>A) \<in> carrier L"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> carrier L

goal (1 subgoal):
 1. f (\<Squnion>A) \<in> carrier L
[PROOF STEP]
by (simp add: assms funcset_carrier[of f L L])
[PROOF STATE]
proof (state)
this:
f (\<Squnion>A) \<in> carrier L

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
assume xA: "x \<in> A"
[PROOF STATE]
proof (state)
this:
x \<in> A

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
hence "x \<in> fps L f"
[PROOF STATE]
proof (prove)
using this:
x \<in> A

goal (1 subgoal):
 1. x \<in> fps L f
[PROOF STEP]
using assms subsetCE
[PROOF STATE]
proof (prove)
using this:
x \<in> A
f \<in> carrier L \<rightarrow> carrier L
Mono f
A \<subseteq> fps L f
\<lbrakk>?A \<subseteq> ?B; ?c \<notin> ?A \<Longrightarrow> ?P; ?c \<in> ?B \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

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

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
hence "f x .=\<^bsub>L\<^esub> x"
[PROOF STATE]
proof (prove)
using this:
x \<in> fps L f

goal (1 subgoal):
 1. f x .= x
[PROOF STEP]
by (auto simp add: fps_def)
[PROOF STATE]
proof (state)
this:
f x .= x

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f x .= x

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
have "f x \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub>A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
by (meson AL assms(2) subsetCE sup_closed sup_upper use_iso1 xA)
[PROOF STATE]
proof (state)
this:
f x \<sqsubseteq> f (\<Squnion>A)

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
f x .= x
f x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
show "x \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub>A)"
[PROOF STATE]
proof (prove)
using this:
f x .= x
f x \<sqsubseteq> f (\<Squnion>A)

goal (1 subgoal):
 1. x \<sqsubseteq> f (\<Squnion>A)
[PROOF STEP]
by (meson AL fA assms(1) funcset_carrier le_cong local.refl subsetCE xA)
[PROOF STATE]
proof (state)
this:
x \<sqsubseteq> f (\<Squnion>A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma filtermap_tan_at_left:
  fixes a::real
  assumes "cos a\<noteq>0"
  shows "filtermap tan (at_left a) = at_left (tan a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
have "filtermap tan (at_right (- a)) = at_right (tan (- a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filtermap tan (at_right (- a)) = at_right (tan (- a))
[PROOF STEP]
using filtermap_tan_at_right[of "-a"] assms
[PROOF STATE]
proof (prove)
using this:
cos (- a) \<noteq> 0 \<Longrightarrow> filtermap tan (at_right (- a)) = at_right (tan (- a))
cos a \<noteq> 0

goal (1 subgoal):
 1. filtermap tan (at_right (- a)) = at_right (tan (- a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
filtermap tan (at_right (- a)) = at_right (tan (- a))

goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
filtermap tan (at_right (- a)) = at_right (tan (- a))
[PROOF STEP]
have "filtermap (uminus o tan) (at_left a) = filtermap uminus (at_left (tan a))"
[PROOF STATE]
proof (prove)
using this:
filtermap tan (at_right (- a)) = at_right (tan (- a))

goal (1 subgoal):
 1. filtermap (uminus \<circ> tan) (at_left a) = filtermap uminus (at_left (tan a))
[PROOF STEP]
unfolding at_right_minus filtermap_filtermap comp_def
[PROOF STATE]
proof (prove)
using this:
filtermap (\<lambda>x. tan (- x)) (at_left (- (- a))) = filtermap uminus (at_left (- tan (- a)))

goal (1 subgoal):
 1. filtermap (\<lambda>x. - tan x) (at_left a) = filtermap uminus (at_left (tan a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
filtermap (uminus \<circ> tan) (at_left a) = filtermap uminus (at_left (tan a))

goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
filtermap (uminus \<circ> tan) (at_left a) = filtermap uminus (at_left (tan a))
[PROOF STEP]
have "filtermap uminus (filtermap (uminus o tan) (at_left a))
      = filtermap uminus (filtermap uminus (at_left (tan a)))"
[PROOF STATE]
proof (prove)
using this:
filtermap (uminus \<circ> tan) (at_left a) = filtermap uminus (at_left (tan a))

goal (1 subgoal):
 1. filtermap uminus (filtermap (uminus \<circ> tan) (at_left a)) = filtermap uminus (filtermap uminus (at_left (tan a)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
filtermap uminus (filtermap (uminus \<circ> tan) (at_left a)) = filtermap uminus (filtermap uminus (at_left (tan a)))

goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
filtermap uminus (filtermap (uminus \<circ> tan) (at_left a)) = filtermap uminus (filtermap uminus (at_left (tan a)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
filtermap uminus (filtermap (uminus \<circ> tan) (at_left a)) = filtermap uminus (filtermap uminus (at_left (tan a)))

goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
unfolding filtermap_filtermap comp_def
[PROOF STATE]
proof (prove)
using this:
filtermap (\<lambda>x. - (- tan x)) (at_left a) = filtermap (\<lambda>x. - (- x)) (at_left (tan a))

goal (1 subgoal):
 1. filtermap tan (at_left a) = at_left (tan a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
filtermap tan (at_left a) = at_left (tan a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem MM5: "\<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
have "\<turnstile> \<box>F \<longrightarrow> \<box>(F \<or> G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>F \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
by (rule STL4) auto
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>F \<longrightarrow> \<box>(F \<or> G)

goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>F \<longrightarrow> \<box>(F \<or> G)

goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
have "\<turnstile> \<box>G \<longrightarrow> \<box>(F \<or> G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
by (rule STL4) auto
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>G \<longrightarrow> \<box>(F \<or> G)

goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<turnstile> \<box>F \<longrightarrow> \<box>(F \<or> G)
\<turnstile> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<turnstile> \<box>F \<longrightarrow> \<box>(F \<or> G)
\<turnstile> \<box>G \<longrightarrow> \<box>(F \<or> G)

goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(F \<or> G)

goal:
No subgoals!
[PROOF STEP]
qed