[STATEMENT]
lemma quadruple_diff_Union_eq:
  "\<Union> ((\<lambda> x. {(a, b, c, d) | a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) ` (differenceset A A)) =
    additive_quadruple_set A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) = additive_quadruple_set A
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) \<subseteq> additive_quadruple_set A
 2. additive_quadruple_set A \<subseteq> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
show "(\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and>
    additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) \<subseteq> additive_quadruple_set A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) \<subseteq> additive_quadruple_set A
[PROOF STEP]
unfolding additive_quadruple_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) \<subseteq> {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d}
[PROOF STEP]
by (intro Union_least)(auto)
[PROOF STATE]
proof (state)
this:
(\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x}) \<subseteq> additive_quadruple_set A

goal (1 subgoal):
 1. additive_quadruple_set A \<subseteq> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. additive_quadruple_set A \<subseteq> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
show "additive_quadruple_set A \<subseteq> (\<Union>x\<in>differenceset A A.
    {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive_quadruple_set A \<subseteq> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
proof (intro subsetI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> additive_quadruple_set A \<Longrightarrow> x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> additive_quadruple_set A \<Longrightarrow> x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
assume"x \<in> additive_quadruple_set A"
[PROOF STATE]
proof (state)
this:
x \<in> additive_quadruple_set A

goal (1 subgoal):
 1. \<And>x. x \<in> additive_quadruple_set A \<Longrightarrow> x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> additive_quadruple_set A
[PROOF STEP]
obtain x1 x2 x3 x4 where hx: "x = (x1, x2, x3, x4)" and hx1: "x1 \<in> A" and hx2: "x2 \<in> A" and hx3: "x3 \<in> A"
      and hx4: "x4 \<in> A" and hxadd: "additive_quadruple x1 x2 x3 x4"
[PROOF STATE]
proof (prove)
using this:
x \<in> additive_quadruple_set A

goal (1 subgoal):
 1. (\<And>x1 x2 x3 x4. \<lbrakk>x = (x1, x2, x3, x4); x1 \<in> A; x2 \<in> A; x3 \<in> A; x4 \<in> A; additive_quadruple x1 x2 x3 x4\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using additive_quadruple_set_def
[PROOF STATE]
proof (prove)
using this:
x \<in> additive_quadruple_set A
additive_quadruple_set ?A \<equiv> {(a, b, c, d) |a b c d. a \<in> ?A \<and> b \<in> ?A \<and> c \<in> ?A \<and> d \<in> ?A \<and> additive_quadruple a b c d}

goal (1 subgoal):
 1. (\<And>x1 x2 x3 x4. \<lbrakk>x = (x1, x2, x3, x4); x1 \<in> A; x2 \<in> A; x3 \<in> A; x4 \<in> A; additive_quadruple x1 x2 x3 x4\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = (x1, x2, x3, x4)
x1 \<in> A
x2 \<in> A
x3 \<in> A
x4 \<in> A
additive_quadruple x1 x2 x3 x4

goal (1 subgoal):
 1. \<And>x. x \<in> additive_quadruple_set A \<Longrightarrow> x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
have hxmem: "(x1, x2, x3, x4) \<in> {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and>
      additive_quadruple a b c d \<and> a \<ominus> c = x1 \<ominus> x3 \<and> d \<ominus> b = x1 \<ominus> x3}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x1, x2, x3, x4) \<in> {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x1 \<ominus> x3 \<and> d \<ominus> b = x1 \<ominus> x3}
[PROOF STEP]
using additive_quadruple_diff hx1 hx2 hx3 hx4 hxadd
[PROOF STATE]
proof (prove)
using this:
additive_quadruple ?a ?b ?c ?d \<Longrightarrow> ?a \<ominus> ?c = ?d \<ominus> ?b
x1 \<in> A
x2 \<in> A
x3 \<in> A
x4 \<in> A
additive_quadruple x1 x2 x3 x4

goal (1 subgoal):
 1. (x1, x2, x3, x4) \<in> {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x1 \<ominus> x3 \<and> d \<ominus> b = x1 \<ominus> x3}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x1, x2, x3, x4) \<in> {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x1 \<ominus> x3 \<and> d \<ominus> b = x1 \<ominus> x3}

goal (1 subgoal):
 1. \<And>x. x \<in> additive_quadruple_set A \<Longrightarrow> x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
show "x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and>
      additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
using hx hxmem hx1 hx3 additive_quadruple_def hxadd
[PROOF STATE]
proof (prove)
using this:
x = (x1, x2, x3, x4)
(x1, x2, x3, x4) \<in> {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x1 \<ominus> x3 \<and> d \<ominus> b = x1 \<ominus> x3}
x1 \<in> A
x3 \<in> A
additive_quadruple ?a ?b ?c ?d \<equiv> ?a \<in> G \<and> ?b \<in> G \<and> ?c \<in> G \<and> ?d \<in> G \<and> ?a \<oplus> ?b = ?c \<oplus> ?d
additive_quadruple x1 x2 x3 x4

goal (1 subgoal):
 1. x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
additive_quadruple_set A \<subseteq> (\<Union>x\<in>differenceset A A. {(a, b, c, d) |a b c d. a \<in> A \<and> b \<in> A \<and> c \<in> A \<and> d \<in> A \<and> additive_quadruple a b c d \<and> a \<ominus> c = x \<and> d \<ominus> b = x})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem ll_010:
  "t \<in> {10 .. 10} \<longrightarrow>
  (s, x1, x2, x3, x4, x5, x6, x7) \<in>
      {(0, 1.10, 0.95, 1.40, 2.30, 0.90, 0.00, 0.35) ..
       (0, 1.30, 1.15, 1.60, 2.50, 1.10, 0.20, 0.55)} \<longrightarrow>
  t \<in> ll.existence_ivl0 (s, x1, x2, x3, x4, x5, x6, x7) \<and>
  ll.flow0 (s, x1, x2, x3, x4, x5, x6, x7) t \<in>
    {(9.99, 0.2, -0.8, -0.4, -1.3, -1.2, 0.0, -0.5) ..
     (10,   1.8, 1.6, 1.8, 6.2, 1.7, 0.2, 1.2)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> point_ivl 10 \<longrightarrow> (s, x1, x2, x3, x4, x5, x6, x7) \<in> {(0, 110 / 10\<^sup>2, 95 / 10\<^sup>2, 140 / 10\<^sup>2, 230 / 10\<^sup>2, 90 / 10\<^sup>2, 0 / 10\<^sup>2, 35 / 10\<^sup>2)..(0, 130 / 10\<^sup>2, 115 / 10\<^sup>2, 160 / 10\<^sup>2, 250 / 10\<^sup>2, 110 / 10\<^sup>2, 20 / 10\<^sup>2, 55 / 10\<^sup>2)} \<longrightarrow> t \<in> ll.existence_ivl0 (s, x1, x2, x3, x4, x5, x6, x7) \<and> ll.flow0 (s, x1, x2, x3, x4, x5, x6, x7) t \<in> {(999 / 10\<^sup>2, 2 / 10, - (8 / 10), - (4 / 10), - (13 / 10), - (12 / 10), 0 / 10, - (5 / 10))..(10, 18 / 10, 16 / 10, 18 / 10, 62 / 10, 17 / 10, 2 / 10, 12 / 10)}
[PROOF STEP]
by (tactic \<open>ode_bnds_tac  @{thms laub_fas_def} 30 60 30 13 [(0, 4, "0x0000ff")] (* "out_ll_010.out" *) ""  @{context} 1\<close>)


[STATEMENT]
lemma Pring_smult_assoc2:
      "!!a x y. [| a \<in> carrier R; x \<in> carrier (Pring R I); y \<in> carrier (Pring R I) |] ==>
      (a \<odot>\<^bsub>Pring R I\<^esub> x) \<otimes>\<^bsub>Pring R I\<^esub> y = a \<odot>\<^bsub>Pring R I\<^esub> (x \<otimes>\<^bsub>Pring R I\<^esub> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a x y. \<lbrakk>a \<in> carrier R; x \<in> carrier (Pring R I); y \<in> carrier (Pring R I)\<rbrakk> \<Longrightarrow> a \<odot>\<^bsub>Pring R I\<^esub> x \<otimes>\<^bsub>Pring R I\<^esub> y = a \<odot>\<^bsub>Pring R I\<^esub> (x \<otimes>\<^bsub>Pring R I\<^esub> y)
[PROOF STEP]
by (simp add: Pring_def poly_scalar_mult_times)


[STATEMENT]
lemma complex_i_mult_minus [simp]: "\<i> * (\<i> * x) = - x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<i> * (\<i> * x) = - x
[PROOF STEP]
by (simp add: mult.assoc [symmetric])


[STATEMENT]
lemma (in Corps) field_one_plus_frac2:"\<lbrakk>a \<in> carrier K; b \<in> carrier K;
 a \<plusminus> b \<noteq> \<zero>\<rbrakk>  \<Longrightarrow> 1\<^sub>r \<plusminus> (-\<^sub>a (a \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen>K\<^esup>)) = b \<cdot>\<^sub>r ((a \<plusminus> b)\<^bsup>\<hyphen>K\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier K; b \<in> carrier K; a \<plusminus> b \<noteq> \<zero>\<rbrakk> \<Longrightarrow> 1\<^sub>r \<plusminus> -\<^sub>a a \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup> = b \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup>
[PROOF STEP]
apply (frule field_op_minus[of "a" "a \<plusminus> b"],
       cut_tac field_is_ring, frule Ring.ring_is_ag[of "K"],
       simp add:aGroup.ag_pOp_closed, assumption, simp,
       thin_tac "-\<^sub>a (a \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup>) = (-\<^sub>a a) \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup>")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier K; b \<in> carrier K; a \<plusminus> b \<noteq> \<zero>\<rbrakk> \<Longrightarrow> 1\<^sub>r \<plusminus> (-\<^sub>a a) \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup> = b \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup>
[PROOF STEP]
apply (cut_tac field_is_ring, frule Ring.ring_is_ag[of "K"],
        frule aGroup.ag_mOp_closed[of "K" "a"], assumption,
        frule field_one_plus_frac1[of "-\<^sub>a a" "a \<plusminus> b"],
        simp add:aGroup.ag_pOp_closed, simp, simp,
        thin_tac "1\<^sub>r \<plusminus> (-\<^sub>a a) \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup> = (a \<plusminus> b \<plusminus> -\<^sub>a a) \<cdot>\<^sub>r (a \<plusminus> b)\<^bsup>\<hyphen> K\<^esup>",
        simp add:aGroup.ag_pOp_assoc[of "K" "a" "b" "-\<^sub>a a"],
        simp add:aGroup.ag_pOp_commute[of "K" "b" "-\<^sub>a a"],
        simp add:aGroup.ag_pOp_assoc[THEN sym],
        simp add:aGroup.ag_r_inv1,
        simp add:aGroup.ag_l_zero)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma awp_Join_eq: "awp (F\<squnion>G) B = awp F B \<inter> awp G B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. awp (F \<squnion> G) B = awp F B \<inter> awp G B
[PROOF STEP]
by (simp add: awp_def wp_def, blast)


[STATEMENT]
lemma (in abelian_group) a_coset_add_assoc:
     "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |]
      ==> (M +> g) +> h = M +> (g \<oplus> h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G\<rbrakk> \<Longrightarrow> M +> g +> h = M +> g \<oplus> h
[PROOF STEP]
by (rule group.coset_mult_assoc [OF a_group,
    folded a_r_coset_def, simplified monoid_record_simps])


[STATEMENT]
lemma maximal_pairwise_r_distinguishable_state_sets_from_separators_code[code] :
  "maximal_pairwise_r_distinguishable_state_sets_from_separators M
    = set (maximal_pairwise_r_distinguishable_state_sets_from_separators_list M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. maximal_pairwise_r_distinguishable_state_sets_from_separators M = set (maximal_pairwise_r_distinguishable_state_sets_from_separators_list M)
[PROOF STEP]
unfolding maximal_pairwise_r_distinguishable_state_sets_from_separators_list_def
            Let_def remove_subsets_set pairwise_r_distinguishable_state_sets_from_separators_code[symmetric]
            maximal_pairwise_r_distinguishable_state_sets_from_separators_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {S \<in> pairwise_r_distinguishable_state_sets_from_separators M. \<nexists>S'. S' \<in> pairwise_r_distinguishable_state_sets_from_separators M \<and> S \<subset> S'} = {xs \<in> pairwise_r_distinguishable_state_sets_from_separators M. \<nexists>xs'. xs' \<in> pairwise_r_distinguishable_state_sets_from_separators M \<and> xs \<subset> xs'}
[PROOF STEP]
by blast


[STATEMENT]
lemma lemDotCommute:
  shows "(u dot v) = (v dot u)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u dot v) = (v dot u)
[PROOF STEP]
by (simp add: mult.commute)


[STATEMENT]
lemma Collect_all_imp_eq: "{x. \<forall>y. P y \<longrightarrow> Q x y} = (INT y: {y. P y}. {x. Q x y})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. \<forall>y. P y \<longrightarrow> Q x y} = (\<Inter>y\<in>{y. P y}. {x. Q x y})
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma mean_square_density:
  "mean_square_density G U \<equiv>
          (\<Sum>R\<in>U. \<Sum>S\<in>U. card R * card S * (edge_density R S G)\<^sup>2) / (card (uverts G))\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mean_square_density G U \<equiv> (\<Sum>R\<in>U. \<Sum>S\<in>U. real (card R * card S) * (edge_density R S G)\<^sup>2) / real ((card (uverts G))\<^sup>2)
[PROOF STEP]
by (simp add: energy_graph_partitions_def energy_graph_subsets_def sum_divide_distrib)


[STATEMENT]
lemma arc_join_eq_alt:
        "pathfinish g1 = pathstart g2
        \<Longrightarrow> (arc(g1 +++ g2) \<longleftrightarrow>
             arc g1 \<and> arc g2 \<and>
             path_image g1 \<inter> path_image g2 = {pathstart g2})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pathfinish g1 = pathstart g2 \<Longrightarrow> arc (g1 +++ g2) = (arc g1 \<and> arc g2 \<and> path_image g1 \<inter> path_image g2 = {pathstart g2})
[PROOF STEP]
using pathfinish_in_path_image
[PROOF STATE]
proof (prove)
using this:
pathfinish ?g \<in> path_image ?g

goal (1 subgoal):
 1. pathfinish g1 = pathstart g2 \<Longrightarrow> arc (g1 +++ g2) = (arc g1 \<and> arc g2 \<and> path_image g1 \<inter> path_image g2 = {pathstart g2})
[PROOF STEP]
by (fastforce simp: arc_join_eq)


[STATEMENT]
lemma matrix_to_iarray_column_add[code_unfold]:
  fixes A::"'a::{semiring_1}^'columns::{mod_type}^'rows::{mod_type}"
  shows "matrix_to_iarray (column_add A i j q) = column_add_iarray (matrix_to_iarray A) (to_nat i) (to_nat j) q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray (column_add A i j q) = column_add_iarray (matrix_to_iarray A) (mod_type_class.to_nat i) (mod_type_class.to_nat j) q
[PROOF STEP]
unfolding column_add_def column_add_iarray_def o_def tabulate2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray (\<chi>ia ja. if ja = i then A $ ia $ i + A $ ia $ j * q else A $ ia $ ja) = IArray.of_fun (\<lambda>ia. IArray.of_fun (\<lambda>ja. if ja = mod_type_class.to_nat i then matrix_to_iarray A !! ia !! mod_type_class.to_nat i + matrix_to_iarray A !! ia !! mod_type_class.to_nat j * q else matrix_to_iarray A !! ia !! ja) (ncols_iarray (matrix_to_iarray A))) (nrows_iarray (matrix_to_iarray A))
[PROOF STEP]
unfolding nrows_eq_card_rows ncols_eq_card_columns
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray (\<chi>ia ja. if ja = i then A $ ia $ i + A $ ia $ j * q else A $ ia $ ja) = IArray.of_fun (\<lambda>ia. IArray.of_fun (\<lambda>ja. if ja = mod_type_class.to_nat i then matrix_to_iarray A !! ia !! mod_type_class.to_nat i + matrix_to_iarray A !! ia !! mod_type_class.to_nat j * q else matrix_to_iarray A !! ia !! ja) CARD('columns)) CARD('rows)
[PROOF STEP]
unfolding  matrix_to_iarray_def o_def vec_to_iarray_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray (map (\<lambda>x. IArray.of_fun (\<lambda>ia. (\<chi>ia ja. if ja = i then A $ ia $ i + A $ ia $ j * q else A $ ia $ ja) $ mod_type_class.from_nat x $ mod_type_class.from_nat ia) CARD('columns)) [0..<CARD('rows)]) = IArray.of_fun (\<lambda>ia. IArray.of_fun (\<lambda>ja. if ja = mod_type_class.to_nat i then IArray (map (\<lambda>x. IArray.of_fun (\<lambda>i. A $ mod_type_class.from_nat x $ mod_type_class.from_nat i) CARD('columns)) [0..<CARD('rows)]) !! ia !! mod_type_class.to_nat i + IArray (map (\<lambda>x. IArray.of_fun (\<lambda>i. A $ mod_type_class.from_nat x $ mod_type_class.from_nat i) CARD('columns)) [0..<CARD('rows)]) !! ia !! mod_type_class.to_nat j * q else IArray (map (\<lambda>x. IArray.of_fun (\<lambda>i. A $ mod_type_class.from_nat x $ mod_type_class.from_nat i) CARD('columns)) [0..<CARD('rows)]) !! ia !! ja) CARD('columns)) CARD('rows)
[PROOF STEP]
by (auto simp add: to_nat_from_nat_id to_nat_less_card[of i] to_nat_less_card[of j])


[STATEMENT]
lemma set_integral_complex_of_real:
  "LINT x:A|M. complex_of_real (f x) = of_real (LINT x:A|M. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x:A|M. complex_of_real (f x) = complex_of_real (set_lebesgue_integral M A f)
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. indicat_real A x *\<^sub>R complex_of_real (f x) = complex_of_real (LINT x|M. indicat_real A x *\<^sub>R f x)
[PROOF STEP]
by (subst integral_complex_of_real[symmetric])
     (auto intro!: Bochner_Integration.integral_cong split: split_indicator)


[STATEMENT]
theorem resolve_conv: "(A \<Longrightarrow> B) \<equiv> (\<not>B \<Longrightarrow> A \<Longrightarrow> False)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<Longrightarrow> B) \<equiv> (\<lbrakk>\<not> B; A\<rbrakk> \<Longrightarrow> False)
[PROOF STEP]
by (rule equal_intr_rule) auto


[STATEMENT]
lemma span_Diff_zero: "span (B - {0}) = span B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. span (B - {0::'b}) = span B
[PROOF STEP]
by (metis span_insert_zero insert_Diff_single)


[STATEMENT]
lemma map_concat_fset:
  shows "map_fset f (concat_fset xs) = concat_fset (map_fset (map_fset f) xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_fset f (concat_fset xs) = concat_fset (map_fset (map_fset f) xs)
[PROOF STEP]
by (lifting map_concat)


[STATEMENT]
lemma app_arg_max_eq_SUP: "has_arg_max (f :: 'b \<Rightarrow> real) X \<Longrightarrow> f (arg_max_on f X) = \<Squnion>(f ` X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_arg_max f X \<Longrightarrow> f (arg_max_on f X) = \<Squnion> (f ` X)
[PROOF STEP]
by (simp add: arg_max_SUP arg_max_on_def has_arg_max_is_arg_max)


[STATEMENT]
lemma jordan_nf_iff_linear_factorization: fixes A :: "'a :: conjugatable_ordered_field mat"
  assumes A: "A \<in> carrier_mat n n"
  shows "(\<exists> n_as. jordan_nf A n_as) = (\<exists> as. char_poly A = (\<Prod> a \<leftarrow> as. [:- a, 1:]))"
    (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>n_as. jordan_nf A n_as) = (\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:]))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>n_as. jordan_nf A n_as \<Longrightarrow> \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
 2. \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:]) \<Longrightarrow> \<exists>n_as. jordan_nf A n_as
[PROOF STEP]
assume ?r
[PROOF STATE]
proof (state)
this:
\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])

goal (2 subgoals):
 1. \<exists>n_as. jordan_nf A n_as \<Longrightarrow> \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
 2. \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:]) \<Longrightarrow> \<exists>n_as. jordan_nf A n_as
[PROOF STEP]
thus ?l
[PROOF STATE]
proof (prove)
using this:
\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])

goal (1 subgoal):
 1. \<exists>n_as. jordan_nf A n_as
[PROOF STEP]
using jordan_nf_exists[OF A]
[PROOF STATE]
proof (prove)
using this:
\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
char_poly A = (\<Prod>a\<leftarrow>?as. [:- a, 1::'a:]) \<Longrightarrow> \<exists>n_as. jordan_nf A n_as

goal (1 subgoal):
 1. \<exists>n_as. jordan_nf A n_as
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>n_as. jordan_nf A n_as

goal (1 subgoal):
 1. \<exists>n_as. jordan_nf A n_as \<Longrightarrow> \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>n_as. jordan_nf A n_as \<Longrightarrow> \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
[PROOF STEP]
assume ?l
[PROOF STATE]
proof (state)
this:
\<exists>n_as. jordan_nf A n_as

goal (1 subgoal):
 1. \<exists>n_as. jordan_nf A n_as \<Longrightarrow> \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>n_as. jordan_nf A n_as
[PROOF STEP]
obtain n_as where jnf: "jordan_nf A n_as"
[PROOF STATE]
proof (prove)
using this:
\<exists>n_as. jordan_nf A n_as

goal (1 subgoal):
 1. (\<And>n_as. jordan_nf A n_as \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jordan_nf A n_as

goal (1 subgoal):
 1. \<exists>n_as. jordan_nf A n_as \<Longrightarrow> \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
[PROOF STEP]
show ?r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
[PROOF STEP]
unfolding jordan_nf_char_poly[OF jnf] expand_powers[of "\<lambda> a. [: -a, 1:]" n_as]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>as. (\<Prod>a\<leftarrow>expand_powers n_as. [:- a, 1::'a:]) = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1::'a:])

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mult_cancel_le_iff [simp]:
  "\<lbrakk>Ord \<alpha>; Ord \<beta>; Ord \<gamma>\<rbrakk> \<Longrightarrow> \<alpha>*\<beta> \<le> \<alpha>*\<gamma> \<longleftrightarrow> \<beta> \<le> \<gamma> \<or> \<alpha>=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord \<alpha>; Ord \<beta>; Ord \<gamma>\<rbrakk> \<Longrightarrow> (\<alpha> * \<beta> \<le> \<alpha> * \<gamma>) = (\<beta> \<le> \<gamma> \<or> \<alpha> = 0)
[PROOF STEP]
by (metis Ord_linear2 Ord_mult eq_iff leD mult_cancel_less_iff mult_cancellation)


[STATEMENT]
lemma transpos_surjec:"\<lbrakk>i \<le> n; j \<le> n; i \<noteq> j\<rbrakk>
                          \<Longrightarrow> surj_to (transpos i j) {i. i \<le> n} {i. i \<le> n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; j \<le> n; i \<noteq> j\<rbrakk> \<Longrightarrow> surj_to (transpos i j) {i. i \<le> n} {i. i \<le> n}
[PROOF STEP]
apply (simp add:surj_to_def,
       frule transpos_hom [of "i" "n" "j"], assumption+,
       frule image_sub [of "transpos i j" "{i. i \<le> n}" "{i. i \<le> n}"
       "{i. i \<le> n}"], simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; j \<le> n; i \<noteq> j; transpos i j \<in> {i. i \<le> n} \<rightarrow> {i. i \<le> n}; transpos i j ` {i. i \<le> n} \<subseteq> {i. i \<le> n}\<rbrakk> \<Longrightarrow> transpos i j ` {i. i \<le> n} = {i. i \<le> n}
[PROOF STEP]
apply (frule transpos_inj [of "i" "n" "j"], assumption+,
       frule card_image [of "transpos i j" "{i. i \<le> n}"],
       simp add:card_seteq)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma two_div_two [simp]:
  shows "2 div Suc (Suc 0) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 div Suc (Suc 0) = 1
[PROOF STEP]
by simp


[STATEMENT]
lemma has_prod_inverse:
  assumes "f has_prod a" shows "(\<lambda>n. inverse (f n)) has_prod (inverse a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. inverse (f n)) has_prod inverse a
[PROOF STEP]
using assms raw_has_prod_inverse
[PROOF STATE]
proof (prove)
using this:
f has_prod a
raw_has_prod f ?M ?a \<Longrightarrow> raw_has_prod (\<lambda>n. inverse (f n)) ?M (inverse ?a)

goal (1 subgoal):
 1. (\<lambda>n. inverse (f n)) has_prod inverse a
[PROOF STEP]
unfolding has_prod_def
[PROOF STATE]
proof (prove)
using this:
raw_has_prod f 0 a \<or> (\<exists>i q. a = (0::'a) \<and> f i = (0::'a) \<and> raw_has_prod f (Suc i) q)
raw_has_prod f ?M ?a \<Longrightarrow> raw_has_prod (\<lambda>n. inverse (f n)) ?M (inverse ?a)

goal (1 subgoal):
 1. raw_has_prod (\<lambda>n. inverse (f n)) 0 (inverse a) \<or> (\<exists>i q. inverse a = (0::'a) \<and> inverse (f i) = (0::'a) \<and> raw_has_prod (\<lambda>n. inverse (f n)) (Suc i) q)
[PROOF STEP]
by auto


[STATEMENT]
lemma eq_from_inner_prod [simp]:
  assumes "dim_vec v = dim_vec w" and "\<langle>v|w\<rangle> = 1" and "\<langle>v|v\<rangle> = 1" and "\<langle>w|w\<rangle> = 1"
  shows "v = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v = w
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. v = w
[PROOF STEP]
have "(cmod(\<langle>v|w\<rangle>))\<^sup>2 = Re (\<langle>v|v\<rangle> * \<langle>w|w\<rangle>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cmod \<langle>v|w\<rangle>)\<^sup>2 = Re (\<langle>v|v\<rangle> * \<langle>w|w\<rangle>)
[PROOF STEP]
by (simp add: assms)
[PROOF STATE]
proof (state)
this:
(cmod \<langle>v|w\<rangle>)\<^sup>2 = Re (\<langle>v|v\<rangle> * \<langle>w|w\<rangle>)

goal (1 subgoal):
 1. v = w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(cmod \<langle>v|w\<rangle>)\<^sup>2 = Re (\<langle>v|v\<rangle> * \<langle>w|w\<rangle>)
[PROOF STEP]
have f0:"\<exists>l. v = (l \<cdot>\<^sub>v w) \<or> w = (l \<cdot>\<^sub>v v)"
[PROOF STATE]
proof (prove)
using this:
(cmod \<langle>v|w\<rangle>)\<^sup>2 = Re (\<langle>v|v\<rangle> * \<langle>w|w\<rangle>)

goal (1 subgoal):
 1. \<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v
[PROOF STEP]
by (simp add: assms(1))
[PROOF STATE]
proof (state)
this:
\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v

goal (1 subgoal):
 1. v = w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v

goal (1 subgoal):
 1. v = w
[PROOF STEP]
proof (cases "\<exists>l. v = (l \<cdot>\<^sub>v w)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<exists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
 2. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<exists>l. v = l \<cdot>\<^sub>v w

goal (2 subgoals):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<exists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
 2. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>l. v = l \<cdot>\<^sub>v w
[PROOF STEP]
have "\<exists>l. v = (l \<cdot>\<^sub>v w) \<and> \<langle>v|w\<rangle> = cnj(l) * \<langle>w|w\<rangle>"
[PROOF STATE]
proof (prove)
using this:
\<exists>l. v = l \<cdot>\<^sub>v w

goal (1 subgoal):
 1. \<exists>l. v = l \<cdot>\<^sub>v w \<and> \<langle>v|w\<rangle> = cnj l * \<langle>w|w\<rangle>
[PROOF STEP]
using inner_prod_distrib_left
[PROOF STATE]
proof (prove)
using this:
\<exists>l. v = l \<cdot>\<^sub>v w
dim_vec ?a = dim_vec ?b \<Longrightarrow> \<langle>?c \<cdot>\<^sub>v ?a|?b\<rangle> = cnj ?c * \<langle>?a|?b\<rangle>

goal (1 subgoal):
 1. \<exists>l. v = l \<cdot>\<^sub>v w \<and> \<langle>v|w\<rangle> = cnj l * \<langle>w|w\<rangle>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>l. v = l \<cdot>\<^sub>v w \<and> \<langle>v|w\<rangle> = cnj l * \<langle>w|w\<rangle>

goal (2 subgoals):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<exists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
 2. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>l. v = l \<cdot>\<^sub>v w \<and> \<langle>v|w\<rangle> = cnj l * \<langle>w|w\<rangle>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>l. v = l \<cdot>\<^sub>v w \<and> \<langle>v|w\<rangle> = cnj l * \<langle>w|w\<rangle>

goal (1 subgoal):
 1. v = w
[PROOF STEP]
by (simp add: assms(2,4))
[PROOF STATE]
proof (state)
this:
v = w

goal (1 subgoal):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<nexists>l. v = l \<cdot>\<^sub>v w

goal (1 subgoal):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nexists>l. v = l \<cdot>\<^sub>v w
[PROOF STEP]
have "\<exists>l. w = (l \<cdot>\<^sub>v v) \<and> \<langle>v|w\<rangle> = l * \<langle>v|v\<rangle>"
[PROOF STATE]
proof (prove)
using this:
\<nexists>l. v = l \<cdot>\<^sub>v w

goal (1 subgoal):
 1. \<exists>l. w = l \<cdot>\<^sub>v v \<and> \<langle>v|w\<rangle> = l * \<langle>v|v\<rangle>
[PROOF STEP]
using f0 inner_prod_distrib_right
[PROOF STATE]
proof (prove)
using this:
\<nexists>l. v = l \<cdot>\<^sub>v w
\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v
dim_vec ?a = dim_vec ?b \<Longrightarrow> \<langle>?a|?c \<cdot>\<^sub>v ?b\<rangle> = ?c * \<langle>?a|?b\<rangle>

goal (1 subgoal):
 1. \<exists>l. w = l \<cdot>\<^sub>v v \<and> \<langle>v|w\<rangle> = l * \<langle>v|v\<rangle>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>l. w = l \<cdot>\<^sub>v v \<and> \<langle>v|w\<rangle> = l * \<langle>v|v\<rangle>

goal (1 subgoal):
 1. \<lbrakk>\<exists>l. v = l \<cdot>\<^sub>v w \<or> w = l \<cdot>\<^sub>v v; \<nexists>l. v = l \<cdot>\<^sub>v w\<rbrakk> \<Longrightarrow> v = w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>l. w = l \<cdot>\<^sub>v v \<and> \<langle>v|w\<rangle> = l * \<langle>v|v\<rangle>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>l. w = l \<cdot>\<^sub>v v \<and> \<langle>v|w\<rangle> = l * \<langle>v|v\<rangle>

goal (1 subgoal):
 1. v = w
[PROOF STEP]
by (simp add: assms(2,3))
[PROOF STATE]
proof (state)
this:
v = w

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
v = w

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dim_span_eq_card_independent: "independent B \<Longrightarrow> dim (span B) = card B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. independent B \<Longrightarrow> dim (span B) = card B
[PROOF STEP]
by (simp add: dim_eq_card)


[STATEMENT]
lemma eSuc_inf_eSuc [simp]: "eSuc n \<sqinter> eSuc m = eSuc (n \<sqinter> m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eSuc n \<sqinter> eSuc m = eSuc (n \<sqinter> m)
[PROOF STEP]
by(simp add: inf_enat_def)


[STATEMENT]
lemma prod_algebraI:
  "finite J \<Longrightarrow> (J \<noteq> {} \<or> I = {}) \<Longrightarrow> J \<subseteq> I \<Longrightarrow> (\<And>i. i \<in> J \<Longrightarrow> E i \<in> sets (M i))
    \<Longrightarrow> prod_emb I M J (\<Pi>\<^sub>E j\<in>J. E j) \<in> prod_algebra I M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite J; J \<noteq> {} \<or> I = {}; J \<subseteq> I; \<And>i. i \<in> J \<Longrightarrow> E i \<in> sets (M i)\<rbrakk> \<Longrightarrow> prod_emb I M J (Pi\<^sub>E J E) \<in> prod_algebra I M
[PROOF STEP]
by (auto simp: prod_algebra_def)


[STATEMENT]
lemma inorder_node41: "height m > 0 \<Longrightarrow>
  inorder (tree\<^sub>d (node41 l' a m b n c r)) = inorder (tree\<^sub>d l') @ a # inorder m @ b # inorder n @ c # inorder r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < height m \<Longrightarrow> inorder (tree\<^sub>d (node41 l' a m b n c r)) = inorder (tree\<^sub>d l') @ a # inorder m @ b # inorder n @ c # inorder r
[PROOF STEP]
by(induct l' a m b n c r rule: node41.induct) auto


[STATEMENT]
lemma list_slice_length: "length (list_slice xs k) = length xs div k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (list_slice xs k) = length xs div k
[PROOF STEP]
by (simp add: list_slice_def list_slice_aux_length)


[STATEMENT]
lemma preal_add_less_cancel_left [simp]: "(t + (r::preal) < t + s) \<longleftrightarrow> (r < s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t + r < t + s) = (r < s)
[PROOF STEP]
by (blast intro: preal_add_less2_mono2 preal_add_left_less_cancel)


[STATEMENT]
lemma orthogonal_sum:
  assumes \<open>finite F\<close> and \<open>\<And>x. x\<in>F \<Longrightarrow> orthogonal_spaces S (T x)\<close>
  shows \<open>orthogonal_spaces S (sum T F)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_spaces S (sum T F)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite F
?x \<in> F \<Longrightarrow> orthogonal_spaces S (T ?x)

goal (1 subgoal):
 1. orthogonal_spaces S (sum T F)
[PROOF STEP]
apply induction
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<And>x. x \<in> {} \<Longrightarrow> orthogonal_spaces S (T x)) \<Longrightarrow> orthogonal_spaces S (sum T {})
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>x. x \<in> F \<Longrightarrow> orthogonal_spaces S (T x)) \<Longrightarrow> orthogonal_spaces S (sum T F); \<And>xa. xa \<in> insert x F \<Longrightarrow> orthogonal_spaces S (T xa)\<rbrakk> \<Longrightarrow> orthogonal_spaces S (sum T (insert x F))
[PROOF STEP]
by (auto intro!: orthogonal_sup)


[STATEMENT]
lemma Crypt_synth_analz:
  "\<lbrakk> Key K \<in> analz H;  Key (invKey K) \<in> analz H \<rbrakk>
    \<Longrightarrow> (Crypt K X \<in> synth (analz H)) = (X \<in> synth (analz H))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Key K \<in> analz H; Key (invKey K) \<in> analz H\<rbrakk> \<Longrightarrow> (Crypt K X \<in> synth (analz H)) = (X \<in> synth (analz H))
[PROOF STEP]
by blast


[STATEMENT]
theorem invar_vebt_insert[vebt_simps]: "invar_vebt t n \<Longrightarrow> x< 2^n \<Longrightarrow> invar_vebt (vebt_insert t x) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>invar_vebt t n; x < 2 ^ n\<rbrakk> \<Longrightarrow> invar_vebt (vebt_insert t x) n
[PROOF STEP]
by (simp add: valid_pres_insert)


[STATEMENT]
lemma diagonal_mat_mult_index':
  fixes A::"'a::comm_ring Matrix.mat"
  assumes "A \<in> carrier_mat n n"
and "B\<in> carrier_mat n n"
and "diagonal_mat B"
and "j < n"
and "i < n"
shows "(A*B) $$(i,j) = B$$(j,j) *A $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
(*"(B*A) $$(i,j) = B$$(i,i) *A $$ (i, j)"*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
have "(A*B) $$ (i,j) = Matrix.scalar_prod (Matrix.row A i) (Matrix.col B j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A * B) $$ (i, j) = Matrix.row A i \<bullet> Matrix.col B j
[PROOF STEP]
using assms
      times_mat_def[of A]
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
diagonal_mat B
j < n
i < n
A * ?B \<equiv> Matrix.mat (dim_row A) (dim_col ?B) (\<lambda>(i, j). Matrix.row A i \<bullet> Matrix.col ?B j)

goal (1 subgoal):
 1. (A * B) $$ (i, j) = Matrix.row A i \<bullet> Matrix.col B j
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(A * B) $$ (i, j) = Matrix.row A i \<bullet> Matrix.col B j

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(A * B) $$ (i, j) = Matrix.row A i \<bullet> Matrix.col B j

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
have "... = Matrix.scalar_prod (Matrix.col B j) (Matrix.row A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Matrix.row A i \<bullet> Matrix.col B j = Matrix.col B j \<bullet> Matrix.row A i
[PROOF STEP]
using comm_scalar_prod[of "Matrix.row A i" n] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Matrix.row A i \<in> carrier_vec n; ?v\<^sub>2 \<in> carrier_vec n\<rbrakk> \<Longrightarrow> Matrix.row A i \<bullet> ?v\<^sub>2 = ?v\<^sub>2 \<bullet> Matrix.row A i
A \<in> carrier_mat n n
B \<in> carrier_mat n n
diagonal_mat B
j < n
i < n

goal (1 subgoal):
 1. Matrix.row A i \<bullet> Matrix.col B j = Matrix.col B j \<bullet> Matrix.row A i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Matrix.row A i \<bullet> Matrix.col B j = Matrix.col B j \<bullet> Matrix.row A i

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Matrix.row A i \<bullet> Matrix.col B j = Matrix.col B j \<bullet> Matrix.row A i

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
have "... = (Matrix.vec_index (Matrix.col B j) j) * (Matrix.vec_index  (Matrix.row A i) j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Matrix.col B j \<bullet> Matrix.row A i = Matrix.col B j $ j * Matrix.row A i $ j
[PROOF STEP]
unfolding Matrix.scalar_prod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>ia = 0..<dim_vec (Matrix.row A i). Matrix.col B j $ ia * Matrix.row A i $ ia) = Matrix.col B j $ j * Matrix.row A i $ j
[PROOF STEP]
proof (rule sum_but_one)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>ia<dim_vec (Matrix.row A i). ia \<noteq> j \<longrightarrow> Matrix.col B j $ ia = (0::'a)
 2. j < dim_vec (Matrix.row A i)
[PROOF STEP]
show "j < dim_vec (Matrix.row A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j < dim_vec (Matrix.row A i)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
diagonal_mat B
j < n
i < n

goal (1 subgoal):
 1. j < dim_vec (Matrix.row A i)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
j < dim_vec (Matrix.row A i)

goal (1 subgoal):
 1. \<forall>ia<dim_vec (Matrix.row A i). ia \<noteq> j \<longrightarrow> Matrix.col B j $ ia = (0::'a)
[PROOF STEP]
show "\<forall>ia<dim_vec (Matrix.row A i). ia \<noteq> j \<longrightarrow> Matrix.vec_index (Matrix.col B j) ia = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>ia<dim_vec (Matrix.row A i). ia \<noteq> j \<longrightarrow> Matrix.col B j $ ia = (0::'a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
diagonal_mat B
j < n
i < n

goal (1 subgoal):
 1. \<forall>ia<dim_vec (Matrix.row A i). ia \<noteq> j \<longrightarrow> Matrix.col B j $ ia = (0::'a)
[PROOF STEP]
by (metis carrier_matD(1) carrier_matD(2) diagonal_mat_def index_col index_row(2))
[PROOF STATE]
proof (state)
this:
\<forall>ia<dim_vec (Matrix.row A i). ia \<noteq> j \<longrightarrow> Matrix.col B j $ ia = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Matrix.col B j \<bullet> Matrix.row A i = Matrix.col B j $ j * Matrix.row A i $ j

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Matrix.col B j \<bullet> Matrix.row A i = Matrix.col B j $ j * Matrix.row A i $ j

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
have "... = B $$(j,j) * A $$(i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Matrix.col B j $ j * Matrix.row A i $ j = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
diagonal_mat B
j < n
i < n

goal (1 subgoal):
 1. Matrix.col B j $ j * Matrix.row A i $ j = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Matrix.col B j $ j * Matrix.row A i $ j = B $$ (j, j) * A $$ (i, j)

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
show "(A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
(A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)

goal (1 subgoal):
 1. (A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(A * B) $$ (i, j) = B $$ (j, j) * A $$ (i, j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma iT_Plus_inext2: "k \<le> n \<Longrightarrow> inext n (I \<oplus> k) = (inext (n - k) I) + k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<le> n \<Longrightarrow> inext n (I \<oplus> k) = inext (n - k) I + k
[PROOF STEP]
by (insert iT_Plus_inext[of "n - k" k I], simp)


[STATEMENT]
lemma int_n_minus_2 [simp]: "int (n - Suc (Suc 0)) = int n - 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card X - Suc (Suc 0)) = int (card X) - 2
[PROOF STEP]
using n_gr_1
[PROOF STATE]
proof (prove)
using this:
1 < card X

goal (1 subgoal):
 1. int (card X - Suc (Suc 0)) = int (card X) - 2
[PROOF STEP]
by simp


[STATEMENT]
lemma ccINF_sup:
  "countable B \<Longrightarrow> sup (INF b\<in>B. f b) a = (INF b\<in>B. sup (f b) a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable B \<Longrightarrow> sup (Inf (f ` B)) a = (INF b\<in>B. sup (f b) a)
[PROOF STEP]
by (simp add: sup_ccINF sup_commute)


[STATEMENT]
lemma rtranclp_r_rtranclp: "\<lbrakk>r\<^sup>*\<^sup>* x y; r y z\<rbrakk> \<Longrightarrow> r\<^sup>*\<^sup>* x z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r\<^sup>*\<^sup>* x y; r y z\<rbrakk> \<Longrightarrow> r\<^sup>*\<^sup>* x z
[PROOF STEP]
by auto


[STATEMENT]
lemma "inorder(join l x r) = inorder l @ x # inorder r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Tree2.inorder (Set2_Join_RBT.join l x r) = Tree2.inorder l @ x # Tree2.inorder r
[PROOF STEP]
by(auto simp: inorder_joinL inorder_joinR inorder_paint join_def
      split!: tree.splits color.splits if_splits
      dest!: arg_cong[where f = inorder])


[STATEMENT]
lemma scalar_matrix_vector_assoc:
  fixes A :: "'a::{field}^'m^'n"
  shows "k *s (A *v v) = k *k A *v v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k *s (A *v v) = k *k A *v v
[PROOF STEP]
by (metis transpose_scalar vector_scalar_matrix_ac vector_transpose_matrix)


[STATEMENT]
lemma abs_absolutely_integrableI_1:
  fixes f :: "'a :: euclidean_space \<Rightarrow> real"
  assumes f: "f integrable_on A" and "(\<lambda>x. \<bar>f x\<bar>) integrable_on A"
  shows "f absolutely_integrable_on A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f absolutely_integrable_on A
[PROOF STEP]
by (rule absolutely_integrable_integrable_bound [OF _ assms]) auto


[STATEMENT]
lemma mult_mm_inv_r:
  assumes "mat_det B \<noteq> 0" and "A *\<^sub>m\<^sub>m B = C"
  shows "A = C *\<^sub>m\<^sub>m mat_inv B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A = C *\<^sub>m\<^sub>m mat_inv B
[PROOF STEP]
using assms mat_eye_r[of A]
[PROOF STATE]
proof (prove)
using this:
mat_det B \<noteq> 0
A *\<^sub>m\<^sub>m B = C
A *\<^sub>m\<^sub>m eye = A

goal (1 subgoal):
 1. A = C *\<^sub>m\<^sub>m mat_inv B
[PROOF STEP]
by (auto simp add: mult_mm_assoc[symmetric] mat_inv_r)


[STATEMENT]
lemma abs_imp_sgn_abs: "\<bar>a\<bar> = \<bar>b\<bar> \<Longrightarrow> \<bar>sgn (a::'a::linordered_idom)\<bar> = \<bar>sgn b\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>a\<bar> = \<bar>b\<bar> \<Longrightarrow> \<bar>sgn a\<bar> = \<bar>sgn b\<bar>
[PROOF STEP]
by (fastforce simp add: abs_if)


[STATEMENT]
theorem (in snd_sylow) p_sylow_mod_p:
  shows "card (subgroups_of_size (p ^ a)) mod p = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
obtain P where PG:"subgroup P G" and cardP:"card P = p ^ a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>P. \<lbrakk>subgroup P G; card P = p ^ a\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis sylow_thm)
[PROOF STATE]
proof (state)
this:
subgroup P G
card P = p ^ a

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
hence orderP:"order (G\<lparr>carrier := P\<rparr>) = p ^ a"
[PROOF STATE]
proof (prove)
using this:
subgroup P G
card P = p ^ a

goal (1 subgoal):
 1. order (G\<lparr>carrier := P\<rparr>) = p ^ a
[PROOF STEP]
unfolding order_def
[PROOF STATE]
proof (prove)
using this:
subgroup P G
card P = p ^ a

goal (1 subgoal):
 1. card (carrier (G\<lparr>carrier := P\<rparr>)) = p ^ a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
order (G\<lparr>carrier := P\<rparr>) = p ^ a

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from PG
[PROOF STATE]
proof (chain)
picking this:
subgroup P G
[PROOF STEP]
have PsubG:"P \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
subgroup P G

goal (1 subgoal):
 1. P \<subseteq> carrier G
[PROOF STEP]
by (metis subgroup.subset)
[PROOF STATE]
proof (state)
this:
P \<subseteq> carrier G

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from PG cardP
[PROOF STATE]
proof (chain)
picking this:
subgroup P G
card P = p ^ a
[PROOF STEP]
have PSize:"P \<in> subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
subgroup P G
card P = p ^ a

goal (1 subgoal):
 1. P \<in> subgroups_of_size (p ^ a)
[PROOF STEP]
unfolding subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
subgroup P G
card P = p ^ a

goal (1 subgoal):
 1. P \<in> {H. subgroup H G \<and> card H = p ^ a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from PG
[PROOF STATE]
proof (chain)
picking this:
subgroup P G
[PROOF STEP]
interpret groupP:group "(G\<lparr>carrier := P\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
subgroup P G

goal (1 subgoal):
 1. Group.group (G\<lparr>carrier := P\<rparr>)
[PROOF STEP]
by (rule subgroup_imp_group)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from cardP
[PROOF STATE]
proof (chain)
picking this:
card P = p ^ a
[PROOF STEP]
have PSize2:"P \<in> groupP.subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
card P = p ^ a

goal (1 subgoal):
 1. P \<in> groupP.subgroups_of_size (p ^ a)
[PROOF STEP]
using groupP.subgroups_of_size_def groupP.subgroup_self
[PROOF STATE]
proof (prove)
using this:
card P = p ^ a
groupP.subgroups_of_size ?p = {H. subgroup H (G\<lparr>carrier := P\<rparr>) \<and> card H = ?p}
subgroup (carrier (G\<lparr>carrier := P\<rparr>)) (G\<lparr>carrier := P\<rparr>)

goal (1 subgoal):
 1. P \<in> groupP.subgroups_of_size (p ^ a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<in> groupP.subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from finite_G
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
[PROOF STEP]
interpret conjG: group_action G "conjugation_action (p ^ a)" "subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)

goal (1 subgoal):
 1. group_action G (conjugation_action (p ^ a)) (subgroups_of_size (p ^ a))
[PROOF STEP]
by (rule acts_on_subsets)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from PG
[PROOF STATE]
proof (chain)
picking this:
subgroup P G
[PROOF STEP]
interpret conjP: group_action "G\<lparr>carrier := P\<rparr>" "conjugation_action (p ^ a)" "subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
subgroup P G

goal (1 subgoal):
 1. group_action (G\<lparr>carrier := P\<rparr>) (conjugation_action (p ^ a)) (subgroups_of_size (p ^ a))
[PROOF STEP]
by (rule conjG.subgroup_action)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
from finite_G
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
[PROOF STEP]
have "finite (subgroups_of_size (p ^ a))"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)

goal (1 subgoal):
 1. finite (subgroups_of_size (p ^ a))
[PROOF STEP]
unfolding subgroups_of_size_def subgroup_def
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)

goal (1 subgoal):
 1. finite {H. ((H \<subseteq> carrier G \<and> (\<forall>x y. x \<in> H \<longrightarrow> y \<in> H \<longrightarrow> x \<otimes> y \<in> H)) \<and> \<one> \<in> H \<and> (\<forall>x. x \<in> H \<longrightarrow> inv x \<in> H)) \<and> card H = p ^ a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (subgroups_of_size (p ^ a))

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
with orderP prime_p
[PROOF STATE]
proof (chain)
picking this:
order (G\<lparr>carrier := P\<rparr>) = p ^ a
prime p
finite (subgroups_of_size (p ^ a))
[PROOF STEP]
have "card (subgroups_of_size (p ^ a)) mod p = card conjP.fixed_points mod p"
[PROOF STATE]
proof (prove)
using this:
order (G\<lparr>carrier := P\<rparr>) = p ^ a
prime p
finite (subgroups_of_size (p ^ a))

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = card conjP.fixed_points mod p
[PROOF STEP]
by (rule conjP.fixed_point_congruence)
[PROOF STATE]
proof (state)
this:
card (subgroups_of_size (p ^ a)) mod p = card conjP.fixed_points mod p

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (subgroups_of_size (p ^ a)) mod p = card conjP.fixed_points mod p

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
have "... = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
have "\<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
fix Q
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
assume Qfixed:"Q \<in> conjP.fixed_points"
[PROOF STATE]
proof (state)
this:
Q \<in> conjP.fixed_points

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
hence Qsize:"Q \<in> subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
Q \<in> conjP.fixed_points

goal (1 subgoal):
 1. Q \<in> subgroups_of_size (p ^ a)
[PROOF STEP]
unfolding conjP.fixed_points_def
[PROOF STATE]
proof (prove)
using this:
Q \<in> {m \<in> subgroups_of_size (p ^ a). carrier (G\<lparr>carrier := P\<rparr>) \<subseteq> conjP.stabilizer m}

goal (1 subgoal):
 1. Q \<in> subgroups_of_size (p ^ a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Q \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
hence cardQ:"card Q = p ^ a"
[PROOF STATE]
proof (prove)
using this:
Q \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. card Q = p ^ a
[PROOF STEP]
unfolding subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
Q \<in> {H. subgroup H G \<and> card H = p ^ a}

goal (1 subgoal):
 1. card Q = p ^ a
[PROOF STEP]
by simp
      \<comment> \<open>The normalizer of @{term Q} in @{term G}\<close>
      \<comment> \<open>Let's first show some basic propertiers of @{text N}\<close>
[PROOF STATE]
proof (state)
this:
card Q = p ^ a

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
define N where "N = conjG.stabilizer Q"
[PROOF STATE]
proof (state)
this:
N = conjG.stabilizer Q

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
define k where "k = (card N) div (p ^ a)"
[PROOF STATE]
proof (state)
this:
k = card N div p ^ a

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from N_def Qsize
[PROOF STATE]
proof (chain)
picking this:
N = conjG.stabilizer Q
Q \<in> subgroups_of_size (p ^ a)
[PROOF STEP]
have NG:"subgroup N G"
[PROOF STATE]
proof (prove)
using this:
N = conjG.stabilizer Q
Q \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. subgroup N G
[PROOF STEP]
by (metis conjG.stabilizer_is_subgroup)
[PROOF STATE]
proof (state)
this:
subgroup N G

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
subgroup N G
[PROOF STEP]
interpret groupN: group "G\<lparr>carrier := N\<rparr>"
[PROOF STATE]
proof (prove)
using this:
subgroup N G

goal (1 subgoal):
 1. Group.group (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
by (metis subgroup_imp_group)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from Qsize N_def
[PROOF STATE]
proof (chain)
picking this:
Q \<in> subgroups_of_size (p ^ a)
N = conjG.stabilizer Q
[PROOF STEP]
have QN:"subgroup Q (G\<lparr>carrier := N\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
Q \<in> subgroups_of_size (p ^ a)
N = conjG.stabilizer Q

goal (1 subgoal):
 1. subgroup Q (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
using stabilizer_supergrp_P
[PROOF STATE]
proof (prove)
using this:
Q \<in> subgroups_of_size (p ^ a)
N = conjG.stabilizer Q
\<lbrakk>finite (carrier G); ?P \<in> subgroups_of_size ?p\<rbrakk> \<Longrightarrow> subgroup ?P (G\<lparr>carrier := group_action.stabilizer G (conjugation_action ?p) ?P\<rparr>)

goal (1 subgoal):
 1. subgroup Q (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
by auto
      \<comment> \<open>The following proposition is used to show that $P = Q$ later\<close>
[PROOF STATE]
proof (state)
this:
subgroup Q (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from Qsize
[PROOF STATE]
proof (chain)
picking this:
Q \<in> subgroups_of_size (p ^ a)
[PROOF STEP]
have NfixesQ:"\<forall>g\<in>N. conjugation_action (p ^ a) g Q = Q"
[PROOF STATE]
proof (prove)
using this:
Q \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. \<forall>g\<in>N. conjugation_action (p ^ a) g Q = Q
[PROOF STEP]
unfolding N_def conjG.stabilizer_def
[PROOF STATE]
proof (prove)
using this:
Q \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. \<forall>g\<in>{g \<in> carrier G. conjugation_action (p ^ a) g Q = Q}. conjugation_action (p ^ a) g Q = Q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>g\<in>N. conjugation_action (p ^ a) g Q = Q

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from Qfixed
[PROOF STATE]
proof (chain)
picking this:
Q \<in> conjP.fixed_points
[PROOF STEP]
have PfixesQ:"\<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q"
[PROOF STATE]
proof (prove)
using this:
Q \<in> conjP.fixed_points

goal (1 subgoal):
 1. \<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q
[PROOF STEP]
unfolding conjP.fixed_points_def conjP.stabilizer_def
[PROOF STATE]
proof (prove)
using this:
Q \<in> {m \<in> subgroups_of_size (p ^ a). carrier (G\<lparr>carrier := P\<rparr>) \<subseteq> {g \<in> carrier (G\<lparr>carrier := P\<rparr>). conjugation_action (p ^ a) g m = m}}

goal (1 subgoal):
 1. \<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with PsubG
[PROOF STATE]
proof (chain)
picking this:
P \<subseteq> carrier G
\<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q
[PROOF STEP]
have  "P \<subseteq> N"
[PROOF STATE]
proof (prove)
using this:
P \<subseteq> carrier G
\<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q

goal (1 subgoal):
 1. P \<subseteq> N
[PROOF STEP]
unfolding N_def conjG.stabilizer_def
[PROOF STATE]
proof (prove)
using this:
P \<subseteq> carrier G
\<forall>g\<in>P. conjugation_action (p ^ a) g Q = Q

goal (1 subgoal):
 1. P \<subseteq> {g \<in> carrier G. conjugation_action (p ^ a) g Q = Q}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<subseteq> N

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with PG N_def Qsize
[PROOF STATE]
proof (chain)
picking this:
subgroup P G
N = conjG.stabilizer Q
Q \<in> subgroups_of_size (p ^ a)
P \<subseteq> N
[PROOF STEP]
have PN:"subgroup P (G\<lparr>carrier := N\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
subgroup P G
N = conjG.stabilizer Q
Q \<in> subgroups_of_size (p ^ a)
P \<subseteq> N

goal (1 subgoal):
 1. subgroup P (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
by (metis conjG.stabilizer_is_subgroup is_group subgroup.subgroup_of_subset)
[PROOF STATE]
proof (state)
this:
subgroup P (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with cardP
[PROOF STATE]
proof (chain)
picking this:
card P = p ^ a
subgroup P (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
have "p ^ a dvd order (G\<lparr>carrier := N\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
card P = p ^ a
subgroup P (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. p ^ a dvd order (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
using groupN.card_subgrp_dvd
[PROOF STATE]
proof (prove)
using this:
card P = p ^ a
subgroup P (G\<lparr>carrier := N\<rparr>)
subgroup ?H (G\<lparr>carrier := N\<rparr>) \<Longrightarrow> card ?H dvd order (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. p ^ a dvd order (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
p ^ a dvd order (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
hence "p ^ a dvd card N"
[PROOF STATE]
proof (prove)
using this:
p ^ a dvd order (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. p ^ a dvd card N
[PROOF STEP]
unfolding order_def
[PROOF STATE]
proof (prove)
using this:
p ^ a dvd card (carrier (G\<lparr>carrier := N\<rparr>))

goal (1 subgoal):
 1. p ^ a dvd card N
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
p ^ a dvd card N

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with NG
[PROOF STATE]
proof (chain)
picking this:
subgroup N G
p ^ a dvd card N
[PROOF STEP]
have smaller_sylow:"snd_sylow (G\<lparr>carrier := N\<rparr>) p a k"
[PROOF STATE]
proof (prove)
using this:
subgroup N G
p ^ a dvd card N

goal (1 subgoal):
 1. snd_sylow (G\<lparr>carrier := N\<rparr>) p a k
[PROOF STEP]
unfolding k_def
[PROOF STATE]
proof (prove)
using this:
subgroup N G
p ^ a dvd card N

goal (1 subgoal):
 1. snd_sylow (G\<lparr>carrier := N\<rparr>) p a (card N div p ^ a)
[PROOF STEP]
by (rule restrict_locale)
      \<comment> \<open>Instantiate the @{term snd_sylow} Locale a second time for the normalizer of @{term Q}\<close>
[PROOF STATE]
proof (state)
this:
snd_sylow (G\<lparr>carrier := N\<rparr>) p a k

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
define NcalM where "NcalM = {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a}"
[PROOF STATE]
proof (state)
this:
NcalM = {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a}

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
define NRelM where "NRelM = {(N1, N2). N1 \<in> NcalM \<and> N2 \<in> NcalM \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)}"
[PROOF STATE]
proof (state)
this:
NRelM = {(N1, N2). N1 \<in> NcalM \<and> N2 \<in> NcalM \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)}

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
interpret Nsylow: snd_sylow "G\<lparr>carrier := N\<rparr>" p a k NcalM NRelM
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd_sylow (G\<lparr>carrier := N\<rparr>) p a k &&& (NcalM \<equiv> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a}) &&& NRelM \<equiv> {(N1, N2). N1 \<in> NcalM \<and> N2 \<in> NcalM \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)}
[PROOF STEP]
unfolding NcalM_def NRelM_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd_sylow (G\<lparr>carrier := N\<rparr>) p a k &&& ({s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<equiv> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a}) &&& {(N1, N2). N1 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> N2 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)} \<equiv> {(N1, N2). N1 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> N2 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)}
[PROOF STEP]
using smaller_sylow
[PROOF STATE]
proof (prove)
using this:
snd_sylow (G\<lparr>carrier := N\<rparr>) p a k

goal (1 subgoal):
 1. snd_sylow (G\<lparr>carrier := N\<rparr>) p a k &&& ({s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<equiv> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a}) &&& {(N1, N2). N1 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> N2 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)} \<equiv> {(N1, N2). N1 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> N2 \<in> {s. s \<subseteq> carrier (G\<lparr>carrier := N\<rparr>) \<and> card s = p ^ a} \<and> (\<exists>g\<in>carrier (G\<lparr>carrier := N\<rparr>). N1 = N2 #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)}
[PROOF STEP]
.
      \<comment> \<open>@{term P} and @{term Q} are conjugate in @{term N}:\<close>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from cardP PN
[PROOF STATE]
proof (chain)
picking this:
card P = p ^ a
subgroup P (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
have PsizeN:"P \<in> groupN.subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
card P = p ^ a
subgroup P (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. P \<in> groupN.subgroups_of_size (p ^ a)
[PROOF STEP]
unfolding groupN.subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
card P = p ^ a
subgroup P (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. P \<in> {H. subgroup H (G\<lparr>carrier := N\<rparr>) \<and> card H = p ^ a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<in> groupN.subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from cardQ QN
[PROOF STATE]
proof (chain)
picking this:
card Q = p ^ a
subgroup Q (G\<lparr>carrier := N\<rparr>)
[PROOF STEP]
have QsizeN:"Q \<in> groupN.subgroups_of_size (p ^ a)"
[PROOF STATE]
proof (prove)
using this:
card Q = p ^ a
subgroup Q (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. Q \<in> groupN.subgroups_of_size (p ^ a)
[PROOF STEP]
unfolding groupN.subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
card Q = p ^ a
subgroup Q (G\<lparr>carrier := N\<rparr>)

goal (1 subgoal):
 1. Q \<in> {H. subgroup H (G\<lparr>carrier := N\<rparr>) \<and> card H = p ^ a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Q \<in> groupN.subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
from QsizeN PsizeN
[PROOF STATE]
proof (chain)
picking this:
Q \<in> groupN.subgroups_of_size (p ^ a)
P \<in> groupN.subgroups_of_size (p ^ a)
[PROOF STEP]
obtain g where g:"g \<in> carrier (G\<lparr>carrier := N\<rparr>)" "P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)"
[PROOF STATE]
proof (prove)
using this:
Q \<in> groupN.subgroups_of_size (p ^ a)
P \<in> groupN.subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g \<in> carrier (G\<lparr>carrier := N\<rparr>); P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule Nsylow.sylow_conjugate)
[PROOF STATE]
proof (state)
this:
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with NG
[PROOF STATE]
proof (chain)
picking this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
[PROOF STEP]
have "P = g <# (Q #> inv g)"
[PROOF STATE]
proof (prove)
using this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)

goal (1 subgoal):
 1. P = g <# (Q #> inv g)
[PROOF STEP]
unfolding r_coset_def l_coset_def
[PROOF STATE]
proof (prove)
using this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = (\<Union>h\<in>\<Union>h\<in>Q. {h \<otimes>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g}. {g \<otimes>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> h})

goal (1 subgoal):
 1. P = (\<Union>h\<in>\<Union>h\<in>Q. {h \<otimes> inv g}. {g \<otimes> h})
[PROOF STEP]
by (auto simp:m_inv_consistent)
[PROOF STATE]
proof (state)
this:
P = g <# (Q #> inv g)

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with NG g Qsize
[PROOF STATE]
proof (chain)
picking this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
Q \<in> subgroups_of_size (p ^ a)
P = g <# (Q #> inv g)
[PROOF STEP]
have "conjugation_action (p ^ a) g Q = P"
[PROOF STATE]
proof (prove)
using this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
Q \<in> subgroups_of_size (p ^ a)
P = g <# (Q #> inv g)

goal (1 subgoal):
 1. conjugation_action (p ^ a) g Q = P
[PROOF STEP]
unfolding conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
Q \<in> subgroups_of_size (p ^ a)
P = g <# (Q #> inv g)

goal (1 subgoal):
 1. (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size (p ^ a). g <# (P #> inv g)) g Q = P
[PROOF STEP]
using subgroup.subset
[PROOF STATE]
proof (prove)
using this:
subgroup N G
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
Q \<in> subgroups_of_size (p ^ a)
P = g <# (Q #> inv g)
subgroup ?H ?G \<Longrightarrow> ?H \<subseteq> carrier ?G

goal (1 subgoal):
 1. (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size (p ^ a). g <# (P #> inv g)) g Q = P
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
conjugation_action (p ^ a) g Q = P

goal (1 subgoal):
 1. \<And>Q. Q \<in> conjP.fixed_points \<Longrightarrow> Q = P
[PROOF STEP]
with g NfixesQ
[PROOF STATE]
proof (chain)
picking this:
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
\<forall>g\<in>N. conjugation_action (p ^ a) g Q = Q
conjugation_action (p ^ a) g Q = P
[PROOF STEP]
show "Q = P"
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier (G\<lparr>carrier := N\<rparr>)
P = g <#\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> (Q #>\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> inv\<^bsub>G\<lparr>carrier := N\<rparr>\<^esub> g)
\<forall>g\<in>N. conjugation_action (p ^ a) g Q = Q
conjugation_action (p ^ a) g Q = P

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?Q \<in> conjP.fixed_points \<Longrightarrow> ?Q = P

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?Q \<in> conjP.fixed_points \<Longrightarrow> ?Q = P

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
from finite_G PSize
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
P \<in> subgroups_of_size (p ^ a)
[PROOF STEP]
have "P \<in> conjP.fixed_points"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
P \<in> subgroups_of_size (p ^ a)

goal (1 subgoal):
 1. P \<in> conjP.fixed_points
[PROOF STEP]
using P_fixed_point_of_P_conj
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
P \<in> subgroups_of_size (p ^ a)
\<lbrakk>finite (carrier G); ?P \<in> subgroups_of_size ?p\<rbrakk> \<Longrightarrow> ?P \<in> group_action.fixed_points (G\<lparr>carrier := ?P\<rparr>) (conjugation_action ?p) (subgroups_of_size ?p)

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

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
?Q \<in> conjP.fixed_points \<Longrightarrow> ?Q = P
P \<in> conjP.fixed_points
[PROOF STEP]
have "conjP.fixed_points = {P}"
[PROOF STATE]
proof (prove)
using this:
?Q \<in> conjP.fixed_points \<Longrightarrow> ?Q = P
P \<in> conjP.fixed_points

goal (1 subgoal):
 1. conjP.fixed_points = {P}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
conjP.fixed_points = {P}

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
hence one:"card conjP.fixed_points = 1"
[PROOF STATE]
proof (prove)
using this:
conjP.fixed_points = {P}

goal (1 subgoal):
 1. card conjP.fixed_points = 1
[PROOF STEP]
by (auto simp: card_Suc_eq)
[PROOF STATE]
proof (state)
this:
card conjP.fixed_points = 1

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
with prime_p
[PROOF STATE]
proof (chain)
picking this:
prime p
card conjP.fixed_points = 1
[PROOF STEP]
have "card conjP.fixed_points < p"
[PROOF STATE]
proof (prove)
using this:
prime p
card conjP.fixed_points = 1

goal (1 subgoal):
 1. card conjP.fixed_points < p
[PROOF STEP]
unfolding prime_nat_iff
[PROOF STATE]
proof (prove)
using this:
1 < p \<and> (\<forall>m. m dvd p \<longrightarrow> m = 1 \<or> m = p)
card conjP.fixed_points = 1

goal (1 subgoal):
 1. card conjP.fixed_points < p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card conjP.fixed_points < p

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
with one
[PROOF STATE]
proof (chain)
picking this:
card conjP.fixed_points = 1
card conjP.fixed_points < p
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card conjP.fixed_points = 1
card conjP.fixed_points < p

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
using mod_pos_pos_trivial
[PROOF STATE]
proof (prove)
using this:
card conjP.fixed_points = 1
card conjP.fixed_points < p
\<lbrakk>0 \<le> ?k; ?k < ?l\<rbrakk> \<Longrightarrow> ?k mod ?l = ?k

goal (1 subgoal):
 1. card conjP.fixed_points mod p = 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card conjP.fixed_points mod p = 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card conjP.fixed_points mod p = 1

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (subgroups_of_size (p ^ a)) mod p = 1

goal (1 subgoal):
 1. card (subgroups_of_size (p ^ a)) mod p = 1
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
card (subgroups_of_size (p ^ a)) mod p = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma times_enat_simps [simp, code]:
  "enat m * enat n = enat (m * n)"
  "\<infinity> * \<infinity> = (\<infinity>::enat)"
  "\<infinity> * enat n = (if n = 0 then 0 else \<infinity>)"
  "enat m * \<infinity> = (if m = 0 then 0 else \<infinity>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (enat m * enat n = enat (m * n) &&& \<infinity> * \<infinity> = \<infinity>) &&& \<infinity> * enat n = (if n = 0 then 0 else \<infinity>) &&& enat m * \<infinity> = (if m = 0 then 0 else \<infinity>)
[PROOF STEP]
unfolding times_enat_def zero_enat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((case enat m of enat m \<Rightarrow> case enat n of enat n \<Rightarrow> enat (m * n) | \<infinity> \<Rightarrow> if m = 0 then enat 0 else \<infinity> | \<infinity> \<Rightarrow> if enat n = enat 0 then enat 0 else \<infinity>) = enat (m * n) &&& (case \<infinity> of enat m \<Rightarrow> case \<infinity> of enat n \<Rightarrow> enat (m * n) | \<infinity> \<Rightarrow> if m = 0 then enat 0 else \<infinity> | \<infinity> \<Rightarrow> if \<infinity> = enat 0 then enat 0 else \<infinity>) = \<infinity>) &&& (case \<infinity> of enat m \<Rightarrow> case enat n of enat n \<Rightarrow> enat (m * n) | \<infinity> \<Rightarrow> if m = 0 then enat 0 else \<infinity> | \<infinity> \<Rightarrow> if enat n = enat 0 then enat 0 else \<infinity>) = (if n = 0 then enat 0 else \<infinity>) &&& (case enat m of enat m \<Rightarrow> case \<infinity> of enat n \<Rightarrow> enat (m * n) | \<infinity> \<Rightarrow> if m = 0 then enat 0 else \<infinity> | \<infinity> \<Rightarrow> if \<infinity> = enat 0 then enat 0 else \<infinity>) = (if m = 0 then enat 0 else \<infinity>)
[PROOF STEP]
by (simp_all split: enat.split)


[STATEMENT]
lemma norm_inverse_le_norm:
  fixes x :: "'a::real_normed_div_algebra"
  shows "r \<le> norm x \<Longrightarrow> 0 < r \<Longrightarrow> norm (inverse x) \<le> inverse r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r \<le> norm x; 0 < r\<rbrakk> \<Longrightarrow> norm (inverse x) \<le> inverse r
[PROOF STEP]
by (simp add: le_imp_inverse_le norm_inverse)