[STATEMENT]
lemma chain_boundary_simplicial_subdivision:
   "simplicial_chain p S c
    \<Longrightarrow> chain_boundary p (simplicial_subdivision p c) = simplicial_subdivision (p -1) (chain_boundary p c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_chain p S c \<Longrightarrow> chain_boundary p (simplicial_subdivision p c) = simplicial_subdivision (p - 1) (chain_boundary p c)
[PROOF STEP]
proof (induction p arbitrary: c)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>c. simplicial_chain 0 S c \<Longrightarrow> chain_boundary 0 (simplicial_subdivision 0 c) = simplicial_subdivision (0 - 1) (chain_boundary 0 c)
 2. \<And>p c. \<lbrakk>\<And>c. simplicial_chain p S c \<Longrightarrow> chain_boundary p (simplicial_subdivision p c) = simplicial_subdivision (p - 1) (chain_boundary p c); simplicial_chain (Suc p) S c\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) c) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) c)
[PROOF STEP]
case (Suc p)
[PROOF STATE]
proof (state)
this:
simplicial_chain p S ?c \<Longrightarrow> chain_boundary p (simplicial_subdivision p ?c) = simplicial_subdivision (p - 1) (chain_boundary p ?c)
simplicial_chain (Suc p) S c

goal (2 subgoals):
 1. \<And>c. simplicial_chain 0 S c \<Longrightarrow> chain_boundary 0 (simplicial_subdivision 0 c) = simplicial_subdivision (0 - 1) (chain_boundary 0 c)
 2. \<And>p c. \<lbrakk>\<And>c. simplicial_chain p S c \<Longrightarrow> chain_boundary p (simplicial_subdivision p c) = simplicial_subdivision (p - 1) (chain_boundary p c); simplicial_chain (Suc p) S c\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) c) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) c)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) c) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) c)
[PROOF STEP]
using Suc.prems [unfolded simplicial_chain_def]
[PROOF STATE]
proof (prove)
using this:
Poly_Mapping.keys c \<subseteq> Collect (simplicial_simplex (Suc p) S)

goal (1 subgoal):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) c) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) c)
[PROOF STEP]
proof (induction c rule: frag_induction)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
case (one f)
[PROOF STATE]
proof (state)
this:
f \<in> Collect (simplicial_simplex (Suc p) S)

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> Collect (simplicial_simplex (Suc p) S)
[PROOF STEP]
have f: "simplicial_simplex (Suc p) S f"
[PROOF STATE]
proof (prove)
using this:
f \<in> Collect (simplicial_simplex (Suc p) S)

goal (1 subgoal):
 1. simplicial_simplex (Suc p) S f
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
simplicial_simplex (Suc p) S f

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
simplicial_simplex (Suc p) S f
[PROOF STEP]
have "simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))"
[PROOF STATE]
proof (prove)
using this:
simplicial_simplex (Suc p) S f

goal (1 subgoal):
 1. simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))
[PROOF STEP]
by (metis diff_Suc_1 simplicial_chain_boundary simplicial_chain_of simplicial_chain_simplicial_subdivision)
[PROOF STATE]
proof (state)
this:
simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
have "simplicial_chain p S (chain_boundary (Suc p) (frag_of f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_chain p S (chain_boundary (Suc p) (frag_of f))
[PROOF STEP]
using one simplicial_chain_boundary simplicial_chain_of
[PROOF STATE]
proof (prove)
using this:
f \<in> Collect (simplicial_simplex (Suc p) S)
simplicial_chain ?p ?S ?c \<Longrightarrow> simplicial_chain (?p - 1) ?S (chain_boundary ?p ?c)
simplicial_chain ?p ?S (frag_of ?c) = simplicial_simplex ?p ?S ?c

goal (1 subgoal):
 1. simplicial_chain p S (chain_boundary (Suc p) (frag_of f))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
simplicial_chain p S (chain_boundary (Suc p) (frag_of f))

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
simplicial_chain p S (chain_boundary (Suc p) (frag_of f))

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
have "simplicial_subdivision (p - Suc 0) (chain_boundary p (chain_boundary (Suc p) (frag_of f))) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_subdivision (p - Suc 0) (chain_boundary p (chain_boundary (Suc p) (frag_of f))) = 0
[PROOF STEP]
by (metis f chain_boundary_boundary_alt simplicial_simplex_def simplicial_subdivision_0 singular_chain_of)
[PROOF STATE]
proof (state)
this:
simplicial_subdivision (p - Suc 0) (chain_boundary p (chain_boundary (Suc p) (frag_of f))) = 0

goal (3 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>x. x \<in> Collect (simplicial_simplex (Suc p) S) \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of x)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))
simplicial_chain p S (chain_boundary (Suc p) (frag_of f))
simplicial_subdivision (p - Suc 0) (chain_boundary p (chain_boundary (Suc p) (frag_of f))) = 0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))
simplicial_chain p S (chain_boundary (Suc p) (frag_of f))
simplicial_subdivision (p - Suc 0) (chain_boundary p (chain_boundary (Suc p) (frag_of f))) = 0

goal (1 subgoal):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of f)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of f))
[PROOF STEP]
using chain_boundary_simplicial_cone Suc
[PROOF STATE]
proof (prove)
using this:
simplicial_chain p S (simplicial_subdivision p (chain_boundary (Suc p) (frag_of f)))
simplicial_chain p S (chain_boundary (Suc p) (frag_of f))
simplicial_subdivision (p - Suc 0) (chain_boundary p (chain_boundary (Suc p) (frag_of f))) = 0
simplicial_chain ?p ?S ?c \<Longrightarrow> chain_boundary (Suc ?p) (simplicial_cone ?p ?v ?c) = ?c - (if ?p = 0 then frag_extend (\<lambda>f. frag_of (\<lambda>u\<in>standard_simplex ?p. ?v)) ?c else simplicial_cone (?p - 1) ?v (chain_boundary ?p ?c))
simplicial_chain p S ?c \<Longrightarrow> chain_boundary p (simplicial_subdivision p ?c) = simplicial_subdivision (p - 1) (chain_boundary p ?c)
simplicial_chain (Suc p) S c

goal (1 subgoal):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of f)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of f))
[PROOF STEP]
by (auto simp: chain_boundary_of frag_extend_diff simplicial_cone_def)
[PROOF STATE]
proof (state)
this:
chain_boundary (Suc p) (simplicial_subdivision (Suc p) (frag_of f)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (frag_of f))

goal (2 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
case (diff a b)
[PROOF STATE]
proof (state)
this:
chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a)
chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)

goal (2 subgoals):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
 2. \<And>a b. \<lbrakk>chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a); chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)\<rbrakk> \<Longrightarrow> chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a)
chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
chain_boundary (Suc p) (simplicial_subdivision (Suc p) a) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) a)
chain_boundary (Suc p) (simplicial_subdivision (Suc p) b) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) b)

goal (1 subgoal):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))
[PROOF STEP]
by (simp add: simplicial_subdivision_diff chain_boundary_diff frag_extend_diff)
[PROOF STATE]
proof (state)
this:
chain_boundary (Suc p) (simplicial_subdivision (Suc p) (a - b)) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) (a - b))

goal (1 subgoal):
 1. chain_boundary (Suc p) (simplicial_subdivision (Suc p) 0) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
chain_boundary (Suc p) (simplicial_subdivision (Suc p) c) = simplicial_subdivision (Suc p - 1) (chain_boundary (Suc p) c)

goal (1 subgoal):
 1. \<And>c. simplicial_chain 0 S c \<Longrightarrow> chain_boundary 0 (simplicial_subdivision 0 c) = simplicial_subdivision (0 - 1) (chain_boundary 0 c)
[PROOF STEP]
qed auto


[STATEMENT]
lemma coeff_all_0:"(\<And>m. coeff p m = 0) \<Longrightarrow> p=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m. coeff p m = (0::'a)) \<Longrightarrow> p = 0
[PROOF STEP]
by (metis aux coeff_def mapping_of_inject zero_mpoly.rep_eq)


[STATEMENT]
lemma analz_Un: "analz G \<union> analz H \<subseteq> analz (G \<union> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. analz G \<union> analz H \<subseteq> analz (G \<union> H)
[PROOF STEP]
by (intro Un_least analz_mono Un_upper1 Un_upper2)


[STATEMENT]
lemma Sup_sup: "\<forall>X. f(\<Squnion> X) = \<Squnion>{f x | x. x \<in> X} \<Longrightarrow> f (x \<squnion> y) = f x \<squnion> f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>X. f (\<Squnion> X) = \<Squnion> {f x |x. x \<in> X} \<Longrightarrow> f (x \<squnion> y) = f x \<squnion> f y
[PROOF STEP]
apply (erule_tac x="{x, y}" in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (\<Squnion> {x, y}) = \<Squnion> {f xa |xa. xa \<in> {x, y}} \<Longrightarrow> f (x \<squnion> y) = f x \<squnion> f y
[PROOF STEP]
by (force intro: Sup_eqI)


[STATEMENT]
lemma divisor_set_mult:
  "divisor_set  (m*n) = {i*j| i j. (i \<in> divisor_set m)\<and>(j \<in> divisor_set n)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. divisor_set (m * n) = {i * j |i j. i \<in> divisor_set m \<and> j \<in> divisor_set n}
[PROOF STEP]
using divisor_set divisor_def
[PROOF STATE]
proof (prove)
using this:
divisor_set ?m = {n. n divisor ?m}
?n divisor ?m \<equiv> 1 \<le> ?n \<and> ?n \<le> ?m \<and> ?n dvd ?m

goal (1 subgoal):
 1. divisor_set (m * n) = {i * j |i j. i \<in> divisor_set m \<and> j \<in> divisor_set n}
[PROOF STEP]
by (fastforce simp add: divisor_set divisor_def dest: division_decomp)


[STATEMENT]
lemma repeat_mset_right [simp]: "repeat_mset a (repeat_mset b A) = repeat_mset (a * b) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. repeat_mset a (repeat_mset b A) = repeat_mset (a * b) A
[PROOF STEP]
by (auto simp: multiset_eq_iff left_diff_distrib')


[STATEMENT]
lemma cInf_ge: "(S::'a :: conditionally_complete_lattice set) \<noteq> {} \<Longrightarrow> b <=* S \<Longrightarrow> Inf S \<ge> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S \<noteq> {}; b <=* S\<rbrakk> \<Longrightarrow> b \<le> Inf S
[PROOF STEP]
by (metis cInf_greatest setge_def)


[STATEMENT]
lemma alg_dvd_mono [simp]:
  fixes a b c d :: "'a :: field_char_0"
  shows "a alg_dvd c \<Longrightarrow> b alg_dvd d \<Longrightarrow> (a * b) alg_dvd (c * d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a alg_dvd c; b alg_dvd d\<rbrakk> \<Longrightarrow> a * b alg_dvd c * d
[PROOF STEP]
using algebraic_int_times[of "c / a" "d / b"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>algebraic_int (c / a); algebraic_int (d / b)\<rbrakk> \<Longrightarrow> algebraic_int (c / a * (d / b))

goal (1 subgoal):
 1. \<lbrakk>a alg_dvd c; b alg_dvd d\<rbrakk> \<Longrightarrow> a * b alg_dvd c * d
[PROOF STEP]
by (auto simp: alg_dvd_def)


[STATEMENT]
lemma exec_while :
"(\<sigma> \<Turnstile> ((while\<^sub>S\<^sub>E b do c od) ;- M)) =
 (\<sigma> \<Turnstile> ((if\<^sub>S\<^sub>E b then c ;- (while\<^sub>S\<^sub>E b do c od) else unit\<^sub>S\<^sub>E ()fi) ;- M))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<sigma> \<Turnstile> _while_SE b c ;- M) = (\<sigma> \<Turnstile> _if_SE b (c ;- _while_SE b c) (unit\<^sub>S\<^sub>E ()) ;- M)
[PROOF STEP]
apply(subst while_SE_unfold)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<sigma> \<Turnstile> _if_SE b (c ;- _while_SE b c) (unit\<^sub>S\<^sub>E ()) ;- M) = (\<sigma> \<Turnstile> _if_SE b (c ;- _while_SE b c) (unit\<^sub>S\<^sub>E ()) ;- M)
[PROOF STEP]
by(simp add: bind_SE'_def )


[STATEMENT]
lemma size_empty [simp]: "size {#} = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size {#} = 0
[PROOF STEP]
by (simp add: size_multiset_overloaded_def)


[STATEMENT]
lemma (in domain) divides_imp_divides_mult [simp]:
  "\<lbrakk> a \<in> carrier R; b \<in> carrier R - { \<zero> } \<rbrakk> \<Longrightarrow> a divides\<^bsub>R\<^esub> b \<Longrightarrow> a divides\<^bsub>(mult_of R)\<^esub> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier R; b \<in> carrier R - {\<zero>}; a divides b\<rbrakk> \<Longrightarrow> a divides\<^bsub>Ring_Divisibility.mult_of R\<^esub> b
[PROOF STEP]
unfolding factor_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier R; b \<in> carrier R - {\<zero>}; \<exists>c\<in>carrier R. b = a \<otimes> c\<rbrakk> \<Longrightarrow> \<exists>c\<in>carrier (Ring_Divisibility.mult_of R). b = a \<otimes>\<^bsub>Ring_Divisibility.mult_of R\<^esub> c
[PROOF STEP]
using integral_iff
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> carrier R; ?b \<in> carrier R\<rbrakk> \<Longrightarrow> (?a \<otimes> ?b = \<zero>) = (?a = \<zero> \<or> ?b = \<zero>)

goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier R; b \<in> carrier R - {\<zero>}; \<exists>c\<in>carrier R. b = a \<otimes> c\<rbrakk> \<Longrightarrow> \<exists>c\<in>carrier (Ring_Divisibility.mult_of R). b = a \<otimes>\<^bsub>Ring_Divisibility.mult_of R\<^esub> c
[PROOF STEP]
by auto


[STATEMENT]
lemma deriv_pow: "\<lbrakk>f field_differentiable at z\<rbrakk>
   \<Longrightarrow> deriv (\<lambda>w. f w ^ n) z = (if n=0 then 0 else n * deriv f z * f z ^ (n - Suc 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f field_differentiable at z \<Longrightarrow> deriv (\<lambda>w. f w ^ n) z = (if n = 0 then 0 else real n * deriv f z * f z ^ (n - Suc 0))
[PROOF STEP]
unfolding DERIV_deriv_iff_field_differentiable[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_real_derivative deriv f z) (at z) \<Longrightarrow> deriv (\<lambda>w. f w ^ n) z = (if n = 0 then 0 else real n * deriv f z * f z ^ (n - Suc 0))
[PROOF STEP]
by (auto intro!: DERIV_imp_deriv derivative_eq_intros)


[STATEMENT]
lemma real_asymp_real_int_transfer:
  "filterlim (\<lambda>n. real_of_int (f n)) at_top F \<Longrightarrow> filterlim f at_top F"
  "filterlim (\<lambda>n. real_of_int (f n)) at_bot F \<Longrightarrow> filterlim f at_bot F"
  "filterlim (\<lambda>n. real_of_int (f n)) (nhds (of_int c)) F \<Longrightarrow> eventually (\<lambda>n. f n = c) F"
  "eventually (\<lambda>n. real_of_int (f n) \<le> real_of_int (g n)) F \<Longrightarrow> eventually (\<lambda>n. f n \<le> g n) F"
  "eventually (\<lambda>n. real_of_int (f n) < real_of_int (g n)) F \<Longrightarrow> eventually (\<lambda>n. f n < g n) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((LIM n F. real_of_int (f n) :> at_top \<Longrightarrow> filterlim f at_top F) &&& (LIM n F. real_of_int (f n) :> at_bot \<Longrightarrow> filterlim f at_bot F)) &&& (((\<lambda>n. real_of_int (f n)) \<longlongrightarrow> real_of_int c) F \<Longrightarrow> \<forall>\<^sub>F n in F. f n = c) &&& (\<forall>\<^sub>F n in F. real_of_int (f n) \<le> real_of_int (g n) \<Longrightarrow> \<forall>\<^sub>F n in F. f n \<le> g n) &&& (\<forall>\<^sub>F n in F. real_of_int (f n) < real_of_int (g n) \<Longrightarrow> \<forall>\<^sub>F n in F. f n < g n)
[PROOF STEP]
by (simp_all add: tendsto_of_int_iff filterlim_at_top_int_iff_filterlim_real
                    filterlim_at_bot_int_iff_filterlim_real)


[STATEMENT]
lemma disjoint_family_indicator_le_1:
  assumes "disjoint_family_on A I"
  shows "(\<Sum> i\<in> I. indicator (A i) x) \<le> (1::'a:: {comm_monoid_add,zero_less_one})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
proof (cases "finite I")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
 2. infinite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
finite I

goal (2 subgoals):
 1. finite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
 2. infinite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite I
[PROOF STEP]
have *: "(\<Sum> i\<in> I. indicator (A i) x) = ((indicator (\<Union>i\<in>I. A i) x)::'a)"
[PROOF STATE]
proof (prove)
using this:
finite I

goal (1 subgoal):
 1. (\<Sum>i\<in>I. indicator (A i) x) = indicator (\<Union> (A ` I)) x
[PROOF STEP]
by (simp add: indicator_UN_disjoint[OF True assms(1), of x])
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. indicator (A i) x) = indicator (\<Union> (A ` I)) x

goal (2 subgoals):
 1. finite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
 2. infinite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indicator (\<Union> (A ` I)) x \<le> (1::'a)
[PROOF STEP]
unfolding indicator_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_bool (x \<in> \<Union> (A ` I)) \<le> (1::'a)
[PROOF STEP]
by (simp add: order_less_imp_le)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)

goal (1 subgoal):
 1. infinite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infinite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
infinite I

goal (1 subgoal):
 1. infinite I \<Longrightarrow> (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
infinite I
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
infinite I

goal (1 subgoal):
 1. (\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)
[PROOF STEP]
by (simp add: order_less_imp_le)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. indicator (A i) x) \<le> (1::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma expands_to_cong_reverse:
  "eventually (\<lambda>x. f x = g x) at_top \<Longrightarrow> (g expands_to F) bs \<Longrightarrow> (f expands_to F) bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F x in at_top. f x = g x; (g expands_to F) bs\<rbrakk> \<Longrightarrow> (f expands_to F) bs
[PROOF STEP]
using expands_to_cong[of g F bs f]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(g expands_to F) bs; \<forall>\<^sub>F x in at_top. g x = f x\<rbrakk> \<Longrightarrow> (f expands_to F) bs

goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F x in at_top. f x = g x; (g expands_to F) bs\<rbrakk> \<Longrightarrow> (f expands_to F) bs
[PROOF STEP]
by (simp add: eq_commute)


[STATEMENT]
lemma has_field_derivative_stirling_sum_complex [derivative_intros]:
  "Re x > 0 \<Longrightarrow> (stirling_sum j m has_field_derivative stirling_sum (Suc j) m x) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Re x \<Longrightarrow> (stirling_sum j m has_field_derivative stirling_sum (Suc j) m x) (at x)
[PROOF STEP]
unfolding stirling_sum_def [abs_def] sum_distrib_left
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Re x \<Longrightarrow> ((\<lambda>x. \<Sum>n = 1..<m. (- 1) ^ j * (complex_of_real (bernoulli (Suc n)) * pochhammer (of_nat n) j / (of_nat n * of_nat (Suc n)) * inverse x ^ (n + j))) has_field_derivative (\<Sum>n = 1..<m. (- 1) ^ Suc j * (complex_of_real (bernoulli (Suc n)) * pochhammer (of_nat n) (Suc j) / (of_nat n * of_nat (Suc n)) * inverse x ^ (n + Suc j)))) (at x)
[PROOF STEP]
by (rule DERIV_sum) (auto intro!: derivative_eq_intros simp del: of_nat_Suc
                              simp: pochhammer_Suc power_diff)


[STATEMENT]
lemma (in order_topology) tendsto_sandwich:
  assumes ev: "eventually (\<lambda>n. f n \<le> g n) net" "eventually (\<lambda>n. g n \<le> h n) net"
  assumes lim: "(f \<longlongrightarrow> c) net" "(h \<longlongrightarrow> c) net"
  shows "(g \<longlongrightarrow> c) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g \<longlongrightarrow> c) net
[PROOF STEP]
proof (rule order_tendstoI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < g x
 2. \<And>a. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < g x
 2. \<And>a. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
show "a < c \<Longrightarrow> eventually (\<lambda>x. a < g x) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < g x
[PROOF STEP]
using order_tendstoD[OF lim(1), of a] ev
[PROOF STATE]
proof (prove)
using this:
a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < f x
c < a \<Longrightarrow> \<forall>\<^sub>F x in net. f x < a
\<forall>\<^sub>F n in net. f n \<le> g n
\<forall>\<^sub>F n in net. g n \<le> h n

goal (1 subgoal):
 1. a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < g x
[PROOF STEP]
by (auto elim: eventually_elim2)
[PROOF STATE]
proof (state)
this:
a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < g x

goal (1 subgoal):
 1. \<And>a. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
show "c < a \<Longrightarrow> eventually (\<lambda>x. g x < a) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
using order_tendstoD[OF lim(2), of a] ev
[PROOF STATE]
proof (prove)
using this:
a < c \<Longrightarrow> \<forall>\<^sub>F x in net. a < h x
c < a \<Longrightarrow> \<forall>\<^sub>F x in net. h x < a
\<forall>\<^sub>F n in net. f n \<le> g n
\<forall>\<^sub>F n in net. g n \<le> h n

goal (1 subgoal):
 1. c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a
[PROOF STEP]
by (auto elim: eventually_elim2)
[PROOF STATE]
proof (state)
this:
c < a \<Longrightarrow> \<forall>\<^sub>F x in net. g x < a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rk_A'B'PR :
  assumes "rk {P, Q, R} = 2" and "rk {P, R} = 2" and "rk {A', B', P, Q} = 4"
shows "rk {A', B', P, R} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
have "card {A', B', P, R} \<le> 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {A', B', P, R} \<le> 4
[PROOF STEP]
by (smt Suc_numeral assms(2) card.empty card_insert_disjoint dual_order.trans finite.emptyI
        finite_insert insert_absorb linear nat_add_left_cancel_le numeral_2_eq_2 numeral_3_eq_3
        numeral_Bit0 numeral_code(3) numeral_le_one_iff rk_singleton rk_triple_le semiring_norm(2)
        semiring_norm(69) semiring_norm(8))
[PROOF STATE]
proof (state)
this:
card {A', B', P, R} \<le> 4

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card {A', B', P, R} \<le> 4
[PROOF STEP]
have f1:"rk {A', B', P, R} \<le> 4"
[PROOF STATE]
proof (prove)
using this:
card {A', B', P, R} \<le> 4

goal (1 subgoal):
 1. rk {A', B', P, R} \<le> 4
[PROOF STEP]
using dual_order.trans matroid_ax_1b
[PROOF STATE]
proof (prove)
using this:
card {A', B', P, R} \<le> 4
\<lbrakk>?b \<le> ?a; ?c \<le> ?b\<rbrakk> \<Longrightarrow> ?c \<le> ?a
rk ?X \<le> card ?X

goal (1 subgoal):
 1. rk {A', B', P, R} \<le> 4
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rk {A', B', P, R} \<le> 4

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
have f2:"rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}
[PROOF STEP]
using matroid_ax_3_alt[of "{P, R}" "{A', B', P, R}" "{P, Q, R}"]
[PROOF STATE]
proof (prove)
using this:
{P, R} \<subseteq> {A', B', P, R} \<inter> {P, Q, R} \<Longrightarrow> rk ({A', B', P, R} \<union> {P, Q, R}) + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}

goal (1 subgoal):
 1. rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}
[PROOF STEP]
by (simp add: insert_commute)
[PROOF STATE]
proof (state)
this:
rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
have f3:"rk {A', B', P, Q, R} \<ge> 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 4 \<le> rk {A', B', P, Q, R}
[PROOF STEP]
using matroid_ax_2 assms(3)
[PROOF STATE]
proof (prove)
using this:
?X \<subseteq> ?Y \<longrightarrow> rk ?X \<le> rk ?Y
rk {A', B', P, Q} = 4

goal (1 subgoal):
 1. 4 \<le> rk {A', B', P, Q, R}
[PROOF STEP]
by (metis insert_mono subset_insertI)
[PROOF STATE]
proof (state)
this:
4 \<le> rk {A', B', P, Q, R}

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
from f2 and f3
[PROOF STATE]
proof (chain)
picking this:
rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}
4 \<le> rk {A', B', P, Q, R}
[PROOF STEP]
have f4:"rk {A', B', P, R} \<ge> 4"
[PROOF STATE]
proof (prove)
using this:
rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}
4 \<le> rk {A', B', P, Q, R}

goal (1 subgoal):
 1. 4 \<le> rk {A', B', P, R}
[PROOF STEP]
using assms(1) assms(2)
[PROOF STATE]
proof (prove)
using this:
rk {A', B', P, Q, R} + rk {P, R} \<le> rk {A', B', P, R} + rk {P, Q, R}
4 \<le> rk {A', B', P, Q, R}
rk {P, Q, R} = 2
rk {P, R} = 2

goal (1 subgoal):
 1. 4 \<le> rk {A', B', P, R}
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
4 \<le> rk {A', B', P, R}

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
thus "rk {A', B', P, R} = 4"
[PROOF STATE]
proof (prove)
using this:
4 \<le> rk {A', B', P, R}

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
using f1 f4
[PROOF STATE]
proof (prove)
using this:
4 \<le> rk {A', B', P, R}
rk {A', B', P, R} \<le> 4
4 \<le> rk {A', B', P, R}

goal (1 subgoal):
 1. rk {A', B', P, R} = 4
[PROOF STEP]
by (simp add: f1 le_antisym)
[PROOF STATE]
proof (state)
this:
rk {A', B', P, R} = 4

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fls_integral_nth [simp]:
  "fls_integral a $$ n = (if n=0 then 0 else inverse (of_int n) * a$$(n-1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
define F where "F \<equiv> (\<lambda>n. if n=0 then 0 else inverse (of_int n) * a$$(n - 1))"
[PROOF STATE]
proof (state)
this:
F \<equiv> \<lambda>n. if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1)

goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
obtain N where "\<forall>n<N. a$$n = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>N. \<forall>n<N. a $$ n = (0::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim fls_nth_vanishes_belowE)
[PROOF STATE]
proof (state)
this:
\<forall>n<N. a $$ n = (0::'a)

goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
hence "\<forall>n<N. F n = 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>n<N. a $$ n = (0::'a)

goal (1 subgoal):
 1. \<forall>n<N. F n = (0::'a)
[PROOF STEP]
by (auto simp add: F_def)
[PROOF STATE]
proof (state)
this:
\<forall>n<N. F n = (0::'a)

goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>n<N. F n = (0::'a)

goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
using nth_Abs_fls_lower_bound[of N F]
[PROOF STATE]
proof (prove)
using this:
\<forall>n<N. F n = (0::'a)
\<forall>n<N. F n = (0::'a) \<Longrightarrow> Abs_fls F $$ ?n = F ?n

goal (1 subgoal):
 1. fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
unfolding fls_integral_def F_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n<N. (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1)) = (0::'a)
\<forall>n<N. (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1)) = (0::'a) \<Longrightarrow> Abs_fls (\<lambda>n. if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1)) $$ ?n = (if ?n = 0 then 0::'a else inverse (of_int ?n) * a $$ (?n - 1))

goal (1 subgoal):
 1. Abs_fls (\<lambda>n. if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1)) $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fls_integral a $$ n = (if n = 0 then 0::'a else inverse (of_int n) * a $$ (n - 1))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_nat_Int_greaterThan_iff:
  fixes N :: "nat set"
  shows "finite (N \<inter> {n<..}) \<longleftrightarrow> finite N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (N \<inter> {n<..}) = finite N
[PROOF STEP]
apply (simp add: finite_nat_iff_bounded subset_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>k. \<forall>t. t \<in> N \<and> n < t \<longrightarrow> t < k) = (\<exists>k. \<forall>t. t \<in> N \<longrightarrow> t < k)
[PROOF STEP]
by (metis dual_order.strict_trans2 nat_less_le not_less_eq)


[STATEMENT]
lemma sum_fun_image_sup:
  fixes f :: "'a \<Rightarrow> 'b::join_semilattice_zero"
  assumes "finite (A :: 'a set)"
  shows "\<Sum>(f ` A) \<le> z \<longleftrightarrow> (\<forall>a \<in> A. f a \<le> z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum> (f ` A) \<le> z) = (\<forall>a\<in>A. f a \<le> z)
[PROOF STEP]
by (simp add: assms sum_sup)


[STATEMENT]
lemma inj_imp_dim_ker0:
assumes "inj_on T (carrier V)"
shows "vectorspace.dim K (V.vs kerT) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ker.dim = 0
[PROOF STEP]
proof (unfold Ker.dim_def, rule Least_eq_0, rule exI[of _ "{}"])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
have Ker_rw: "carrier (V.vs kerT) = {\<zero>\<^bsub>V\<^esub>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (V.vs kerT) = {\<zero>\<^bsub>V\<^esub>}
[PROOF STEP]
unfolding mod_hom.ker_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (V.vs {v \<in> carrier V. T v = \<zero>\<^bsub>W\<^esub>}) = {\<zero>\<^bsub>V\<^esub>}
[PROOF STEP]
using assms inj_on_contraD
[PROOF STATE]
proof (prove)
using this:
inj_on T (carrier V)
\<lbrakk>inj_on ?f ?A; ?x \<noteq> ?y; ?x \<in> ?A; ?y \<in> ?A\<rbrakk> \<Longrightarrow> ?f ?x \<noteq> ?f ?y

goal (1 subgoal):
 1. carrier (V.vs {v \<in> carrier V. T v = \<zero>\<^bsub>W\<^esub>}) = {\<zero>\<^bsub>V\<^esub>}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
carrier (V.vs kerT) = {\<zero>\<^bsub>V\<^esub>}

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
have "finite {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {}

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite {}

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
have "card {} = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {} = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card {} = 0

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card {} = 0

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
have "{} \<subseteq> carrier (V.vs kerT)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {} \<subseteq> carrier (V.vs kerT)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
{} \<subseteq> carrier (V.vs kerT)

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{} \<subseteq> carrier (V.vs kerT)

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
have "Ker.gen_set {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ker.gen_set {}
[PROOF STEP]
unfolding Ker_rw
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ker.span {} = {\<zero>\<^bsub>V\<^esub>}
[PROOF STEP]
by (simp add: Ker.span_empty)
[PROOF STATE]
proof (state)
this:
Ker.gen_set {}

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite {}
card {} = 0
{} \<subseteq> carrier (V.vs kerT)
Ker.gen_set {}
[PROOF STEP]
show "finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}"
[PROOF STATE]
proof (prove)
using this:
finite {}
card {} = 0
{} \<subseteq> carrier (V.vs kerT)
Ker.gen_set {}

goal (1 subgoal):
 1. finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {} \<and> card {} = 0 \<and> {} \<subseteq> carrier (V.vs kerT) \<and> Ker.gen_set {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma linear_componentwise:
  fixes f:: "'a::euclidean_space \<Rightarrow> 'b::real_inner"
  assumes lf: "linear f"
  shows "(f x) \<bullet> j = (\<Sum>i\<in>Basis. (x\<bullet>i) * (f i\<bullet>j))" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<bullet> j = (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f x \<bullet> j = (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j))
[PROOF STEP]
interpret linear f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linear f
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f x \<bullet> j = (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j))
[PROOF STEP]
have "?rhs = (\<Sum>i\<in>Basis. (x\<bullet>i) *\<^sub>R (f i))\<bullet>j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j)) = (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R f i) \<bullet> j
[PROOF STEP]
by (simp add: inner_sum_left)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j)) = (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R f i) \<bullet> j

goal (1 subgoal):
 1. f x \<bullet> j = (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j)) = (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R f i) \<bullet> j
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j)) = (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R f i) \<bullet> j

goal (1 subgoal):
 1. f x \<bullet> j = (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j))
[PROOF STEP]
by (simp add: euclidean_representation sum[symmetric] scale[symmetric])
[PROOF STATE]
proof (state)
this:
f x \<bullet> j = (\<Sum>i\<in>Basis. x \<bullet> i * (f i \<bullet> j))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_partitions:
  "finite {p. p partitions n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {p. p partitions n}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {p. p partitions n}
[PROOF STEP]
have "{p. p partitions n} \<subseteq> {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i. n + 1 \<le> i \<longrightarrow> f i = 0)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {p. p partitions n} \<subseteq> {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i\<ge>n + 1. f i = 0)}
[PROOF STEP]
by (auto elim: partitions_bounds) (auto simp add: partitions_def)
[PROOF STATE]
proof (state)
this:
{p. p partitions n} \<subseteq> {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i\<ge>n + 1. f i = 0)}

goal (1 subgoal):
 1. finite {p. p partitions n}
[PROOF STEP]
from this bound_domain_and_range_impl_finitely_many_functions[of n "n + 1"]
[PROOF STATE]
proof (chain)
picking this:
{p. p partitions n} \<subseteq> {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i\<ge>n + 1. f i = 0)}
finite {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i\<ge>n + 1. f i = 0)}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{p. p partitions n} \<subseteq> {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i\<ge>n + 1. f i = 0)}
finite {f. (\<forall>i. f i \<le> n) \<and> (\<forall>i\<ge>n + 1. f i = 0)}

goal (1 subgoal):
 1. finite {p. p partitions n}
[PROOF STEP]
by (simp add: finite_subset)
[PROOF STATE]
proof (state)
this:
finite {p. p partitions n}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "7681 = 30 * 256 + (1::int)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 7681 = 30 * 256 + 1
[PROOF STEP]
by simp


[STATEMENT]
lemma "-x + (y + (- y + x)) = (0::int)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - x + (y + (- y + x)) = 0
[PROOF STEP]
by simp


[STATEMENT]
lemma (in comm_monoid) finprod_split:
  "finite A \<Longrightarrow> f ` A \<subseteq> carrier G \<Longrightarrow> a \<in> A \<Longrightarrow> finprod G f A = f a \<otimes> finprod G f (A - {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; f ` A \<subseteq> carrier G; a \<in> A\<rbrakk> \<Longrightarrow> finprod G f A = f a \<otimes> finprod G f (A - {a})
[PROOF STEP]
by (rule trans[OF trans[OF _ finprod_Un_disjoint[of "{a}" "A - {a}" f]]], auto,
  rule arg_cong[of _ _ "finprod G f"], auto)


[STATEMENT]
lemma SA_add_pow_closed:
  assumes "f \<in> carrier (SA n)"
  shows "([(k::nat)]\<cdot>\<^bsub>SA n\<^esub>f) \<in> carrier (SA n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [k] \<cdot>\<^bsub>SA n\<^esub> f \<in> carrier (SA n)
[PROOF STEP]
using assms SA_is_ring[of n]
[PROOF STATE]
proof (prove)
using this:
f \<in> carrier (SA n)
ring (SA n)

goal (1 subgoal):
 1. [k] \<cdot>\<^bsub>SA n\<^esub> f \<in> carrier (SA n)
[PROOF STEP]
by (meson ring.nat_mult_closed)


[STATEMENT]
lemma two_three_add_le_mult: assumes "2 \<le> (l::nat)" and  "3 \<le> k" shows "l + k + 1 \<le> l*k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l + k + 1 \<le> l * k
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. l + k + 1 \<le> l * k
[PROOF STEP]
obtain l' where l: "l = Suc (Suc l')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l'. l = Suc (Suc l') \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using  \<open>2 \<le> l\<close> at_least2_Suc[OF \<open>2 \<le> l\<close>]
[PROOF STATE]
proof (prove)
using this:
2 \<le> l
(\<And>k'. l = Suc (Suc k') \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>l'. l = Suc (Suc l') \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
l = Suc (Suc l')

goal (1 subgoal):
 1. l + k + 1 \<le> l * k
[PROOF STEP]
obtain k' where k: "k = Suc (Suc (Suc k'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k'. k = Suc (Suc (Suc k')) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using  \<open>3 \<le> k\<close> at_least3_Suc[OF \<open>3 \<le> k\<close>]
[PROOF STATE]
proof (prove)
using this:
3 \<le> k
(\<And>k'. k = Suc (Suc (Suc k')) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>k'. k = Suc (Suc (Suc k')) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
k = Suc (Suc (Suc k'))

goal (1 subgoal):
 1. l + k + 1 \<le> l * k
[PROOF STEP]
show "l + k + 1 \<le> l*k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l + k + 1 \<le> l * k
[PROOF STEP]
unfolding l k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (Suc l') + Suc (Suc (Suc k')) + 1 \<le> Suc (Suc l') * Suc (Suc (Suc k'))
[PROOF STEP]
by (induct l' k' rule: nat_induct_pair, simp, simp add: add.commute[of "Suc (Suc l')"] mult.commute[of "Suc (Suc l')"], simp_all)
[PROOF STATE]
proof (state)
this:
l + k + 1 \<le> l * k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_interval: "finite {i. (i::nat)<m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i. i < m}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {i. i < m}
[PROOF STEP]
have "{i. i < m} = (\<lambda> x. x) ` {i. i < m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {i. i < m} = (\<lambda>x. x) ` {i. i < m}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{i. i < m} = (\<lambda>x. x) ` {i. i < m}

goal (1 subgoal):
 1. finite {i. i < m}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{i. i < m} = (\<lambda>x. x) ` {i. i < m}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{i. i < m} = (\<lambda>x. x) ` {i. i < m}

goal (1 subgoal):
 1. finite {i. i < m}
[PROOF STEP]
by (rule nat_seg_image_imp_finite)
[PROOF STATE]
proof (state)
this:
finite {i. i < m}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma perm_rem_simps:
  assumes "bij f"
  shows
  "x = y \<Longrightarrow> perm_rem x f y = x"
  "f y = x \<Longrightarrow> perm_rem x f y = f x"
  "y \<noteq> x \<Longrightarrow> f y \<noteq> x \<Longrightarrow> perm_rem x f y = f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x = y \<Longrightarrow> perm_rem x f y = x) &&& (f y = x \<Longrightarrow> perm_rem x f y = f x) &&& (\<lbrakk>y \<noteq> x; f y \<noteq> x\<rbrakk> \<Longrightarrow> perm_rem x f y = f y)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
bij f

goal (1 subgoal):
 1. (x = y \<Longrightarrow> perm_rem x f y = x) &&& (f y = x \<Longrightarrow> perm_rem x f y = f x) &&& (\<lbrakk>y \<noteq> x; f y \<noteq> x\<rbrakk> \<Longrightarrow> perm_rem x f y = f y)
[PROOF STEP]
by (auto simp: perm_rem_def transpose_def bij_iff)


[STATEMENT]
lemma part_circlepath_mirror:
  assumes "a' = a + pi + 2 * pi * of_int k" "b' = b + pi + 2 * pi * of_int k" "c' = -c"
  shows   "-part_circlepath c r a b = part_circlepath c' r a' b'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - part_circlepath c r a b = part_circlepath c' r a' b'
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
fix x :: real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
have "part_circlepath c' r a' b' x = c' + r * cis (linepath a b x + pi + k * (2 * pi))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. part_circlepath c' r a' b' x = c' + complex_of_real r * cis (linepath a b x + pi + real_of_int k * (2 * pi))
[PROOF STEP]
by (simp add: part_circlepath_def exp_eq_polar assms linepath_translate_right mult_ac)
[PROOF STATE]
proof (state)
this:
part_circlepath c' r a' b' x = c' + complex_of_real r * cis (linepath a b x + pi + real_of_int k * (2 * pi))

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
part_circlepath c' r a' b' x = c' + complex_of_real r * cis (linepath a b x + pi + real_of_int k * (2 * pi))

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
have "cis (linepath a b x + pi + k * (2 * pi)) = cis (linepath a b x + pi)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cis (linepath a b x + pi + real_of_int k * (2 * pi)) = cis (linepath a b x + pi)
[PROOF STEP]
by (rule cis.plus_of_int)
[PROOF STATE]
proof (state)
this:
cis (linepath a b x + pi + real_of_int k * (2 * pi)) = cis (linepath a b x + pi)

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cis (linepath a b x + pi + real_of_int k * (2 * pi)) = cis (linepath a b x + pi)

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
have "\<dots> = -cis (linepath a b x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cis (linepath a b x + pi) = - cis (linepath a b x)
[PROOF STEP]
by (simp add: minus_cis)
[PROOF STATE]
proof (state)
this:
cis (linepath a b x + pi) = - cis (linepath a b x)

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cis (linepath a b x + pi) = - cis (linepath a b x)

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
have "c' + r * \<dots> = -part_circlepath c r a b x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c' + complex_of_real r * - cis (linepath a b x) = - part_circlepath c r a b x
[PROOF STEP]
by (simp add: part_circlepath_def assms exp_eq_polar)
[PROOF STATE]
proof (state)
this:
c' + complex_of_real r * - cis (linepath a b x) = - part_circlepath c r a b x

goal (1 subgoal):
 1. \<And>x. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
part_circlepath c' r a' b' x = - part_circlepath c r a b x
[PROOF STEP]
show "(- part_circlepath c r a b) x = part_circlepath c' r a' b' x"
[PROOF STATE]
proof (prove)
using this:
part_circlepath c' r a' b' x = - part_circlepath c r a b x

goal (1 subgoal):
 1. (- part_circlepath c r a b) x = part_circlepath c' r a' b' x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(- part_circlepath c r a b) x = part_circlepath c' r a' b' x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in is_iso_functor) is_iso_functor_op':
  assumes "\<AA>' = op_cat \<AA>" and "\<BB>' = op_cat \<BB>"
  shows "op_cf \<FF> : op_cat \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> op_cat \<BB>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_cf \<FF> : op_cat \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> op_cat \<BB>
[PROOF STEP]
unfolding assms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_cf \<FF> : op_cat \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> op_cat \<BB>
[PROOF STEP]
by (rule is_iso_functor_op)


[STATEMENT]
lemma le_mult_floor_Ints:
  assumes "0 \<le> a" "a \<in> Ints"
  shows "of_int (\<lfloor>a\<rfloor> * \<lfloor>b\<rfloor>) \<le> (of_int\<lfloor>a * b\<rfloor> :: 'a :: linordered_idom)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int (\<lfloor>a\<rfloor> * \<lfloor>b\<rfloor>) \<le> of_int \<lfloor>a * b\<rfloor>
[PROOF STEP]
by (metis Ints_cases assms floor_less_iff floor_of_int linorder_not_less mult_left_mono of_int_floor_le of_int_less_iff of_int_mult)


[STATEMENT]
lemma symmatrix_preserve:
  fixes M N :: "('a::comm_semiring_1)^'n^'n"
  assumes "symmatrix M"
  shows "symmatrix (N ** M ** transpose N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. symmatrix (N ** M ** Finite_Cartesian_Product.transpose N)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. symmatrix (N ** M ** Finite_Cartesian_Product.transpose N)
[PROOF STEP]
have "transpose (N ** M ** transpose N) = N ** (M ** transpose N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Cartesian_Product.transpose (N ** M ** Finite_Cartesian_Product.transpose N) = N ** (M ** Finite_Cartesian_Product.transpose N)
[PROOF STEP]
by (metis (no_types) transpose_transpose assms matrix_transpose_mul symmatrix_def)
[PROOF STATE]
proof (state)
this:
Finite_Cartesian_Product.transpose (N ** M ** Finite_Cartesian_Product.transpose N) = N ** (M ** Finite_Cartesian_Product.transpose N)

goal (1 subgoal):
 1. symmatrix (N ** M ** Finite_Cartesian_Product.transpose N)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Finite_Cartesian_Product.transpose (N ** M ** Finite_Cartesian_Product.transpose N) = N ** (M ** Finite_Cartesian_Product.transpose N)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Finite_Cartesian_Product.transpose (N ** M ** Finite_Cartesian_Product.transpose N) = N ** (M ** Finite_Cartesian_Product.transpose N)

goal (1 subgoal):
 1. symmatrix (N ** M ** Finite_Cartesian_Product.transpose N)
[PROOF STEP]
by (simp add: matrix_mul_assoc symmatrix_def)
[PROOF STATE]
proof (state)
this:
symmatrix (N ** M ** Finite_Cartesian_Product.transpose N)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_0th_higher_deriv:
  "(fps_deriv ^^ n) f $ 0 = fact n * f $ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fps_deriv ^^ n) f $ 0 = fact n * f $ n
[PROOF STEP]
by  (induction n arbitrary: f)
      (simp_all add: funpow_Suc_right mult_of_nat_commute algebra_simps del: funpow.simps)


[STATEMENT]
lemma field_differentiable_power [derivative_intros]:
  assumes "f field_differentiable (at a within S)"
    shows "(\<lambda>z. f z ^ n) field_differentiable (at a within S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. f z ^ n) field_differentiable at a within S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f field_differentiable at a within S

goal (1 subgoal):
 1. (\<lambda>z. f z ^ n) field_differentiable at a within S
[PROOF STEP]
unfolding field_differentiable_def
[PROOF STATE]
proof (prove)
using this:
\<exists>f'. (f has_field_derivative f') (at a within S)

goal (1 subgoal):
 1. \<exists>f'. ((\<lambda>z. f z ^ n) has_field_derivative f') (at a within S)
[PROOF STEP]
by (metis DERIV_power)


[STATEMENT]
lemma iter_hcomp_cong:
  assumes "\<forall>v \<in> fset vs. \<phi> v = \<phi>' v"
  shows "(\<Otimes>v|\<in>|vs. \<phi> v) = (\<Otimes>v|\<in>|vs. \<phi>' v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. iter_hcomp vs \<phi> = iter_hcomp vs \<phi>'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>v\<in>fset vs. \<phi> v = \<phi>' v

goal (1 subgoal):
 1. iter_hcomp vs \<phi> = iter_hcomp vs \<phi>'
[PROOF STEP]
unfolding iter_hcomp_def
[PROOF STATE]
proof (prove)
using this:
\<forall>v\<in>fset vs. \<phi> v = \<phi>' v

goal (1 subgoal):
 1. ffold ((\<otimes>) \<circ> \<phi>) \<epsilon> vs = ffold ((\<otimes>) \<circ> \<phi>') \<epsilon> vs
[PROOF STEP]
by (auto simp add: fmember.rep_eq comp_fun_commute.comp_comp_fun_commute comp_fun_commute_hcomp
  intro: ffold_cong)


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

goal (1 subgoal):
 1. divisor_set n = properdiv_set n \<union> {n}
[PROOF STEP]
by auto


[STATEMENT]
lemma sum_sound:
  assumes sP: "\<forall>x\<in>S. sound (P x)"
  shows "sound (\<lambda>s. \<Sum>x\<in>S. P x s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (\<lambda>s. \<Sum>x\<in>S. P x s)
[PROOF STEP]
proof(rule soundI2)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bounded_by ?b (\<lambda>s. \<Sum>x\<in>S. P x s)
 2. nneg (\<lambda>s. \<Sum>x\<in>S. P x s)
[PROOF STEP]
from sP
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S. sound (P x)
[PROOF STEP]
show "bounded_by (\<Sum>x\<in>S. bound_of (P x)) (\<lambda>s. \<Sum>x\<in>S. P x s)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. sound (P x)

goal (1 subgoal):
 1. bounded_by (\<Sum>x\<in>S. bound_of (P x)) (\<lambda>s. \<Sum>x\<in>S. P x s)
[PROOF STEP]
by(auto intro!:sum_mono)
[PROOF STATE]
proof (state)
this:
bounded_by (\<Sum>x\<in>S. bound_of (P x)) (\<lambda>s. \<Sum>x\<in>S. P x s)

goal (1 subgoal):
 1. nneg (\<lambda>s. \<Sum>x\<in>S. P x s)
[PROOF STEP]
from sP
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S. sound (P x)
[PROOF STEP]
show "nneg (\<lambda>s. \<Sum>x\<in>S. P x s)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. sound (P x)

goal (1 subgoal):
 1. nneg (\<lambda>s. \<Sum>x\<in>S. P x s)
[PROOF STEP]
by(auto intro!:sum_nonneg)
[PROOF STATE]
proof (state)
this:
nneg (\<lambda>s. \<Sum>x\<in>S. P x s)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma deriv_add [simp]:
  "\<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk>
   \<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f field_differentiable at z; g field_differentiable at z\<rbrakk> \<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z
[PROOF STEP]
unfolding DERIV_deriv_iff_field_differentiable[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f has_field_derivative deriv f z) (at z); (g has_field_derivative deriv g z) (at z)\<rbrakk> \<Longrightarrow> deriv (\<lambda>w. f w + g w) z = deriv f z + deriv g z
[PROOF STEP]
by (auto intro!: DERIV_imp_deriv derivative_intros)


[STATEMENT]
lemma sqrt_upper_bound_2:
  assumes "x \<ge> 0"
    shows "sqrt x \<le> (1/8)*(x^4 + 28*x^3 + 70*x^2 + 28*x + 1) / ((x + 1)*(x^2 + 6*x + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt x \<le> 1 / 8 * (x ^ 4 + 28 * x ^ 3 + 70 * x\<^sup>2 + 28 * x + 1) / ((x + 1) * (x\<^sup>2 + 6 * x + 1))
[PROOF STEP]
by (metis assms gen_sqrt_upper sqrtu_2_eq)


[STATEMENT]
lemma is_rbt_rbtreeify:
  "\<lbrakk> sorted (map fst kvs); distinct (map fst kvs) \<rbrakk>
  \<Longrightarrow> is_rbt (rbtreeify kvs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sorted (map fst kvs); distinct (map fst kvs)\<rbrakk> \<Longrightarrow> is_rbt (rbtreeify kvs)
[PROOF STEP]
by(simp add: is_rbt_def rbtreeify_def inv1_rbtreeify_g inv2_rbtreeify_g rbt_sorted_rbtreeify_g color_of_rbtreeify_g)


[STATEMENT]
theorem card_M_le_weight_NVLi:
  assumes "matching V E M" and "OSC L E"
  shows "card M \<le> weight {i \<in> L ` V. i > 1} (N V L)" (is "_ \<le> ?W")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?M01 = "\<Sum>i| i \<in> L`V \<and> (i=1 \<or> i=0). card (matching_i i V E M L)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?Mgr1 = "\<Sum>i| i \<in> L`V \<and> 1 < i. card (matching_i i V E M L)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?Mi = "\<Sum> i\<in>L`V. card (matching_i i V E M L)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have "card M \<le> ?Mi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card M \<le> (\<Sum>i\<in>L ` V. card (matching_i i V E M L))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E

goal (1 subgoal):
 1. card M \<le> (\<Sum>i\<in>L ` V. card (matching_i i V E M L))
[PROOF STEP]
by (rule card_M_le_sum_card_Mi)
[PROOF STATE]
proof (state)
this:
card M \<le> (\<Sum>i\<in>L ` V. card (matching_i i V E M L))

goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card M \<le> (\<Sum>i\<in>L ` V. card (matching_i i V E M L))

goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have "?Mi \<le> ?W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?A = "{i \<in> L ` V. i = 1 \<or> i = 0}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?B = "{i \<in> L ` V. 1 < i}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?g = "\<lambda> i. card (matching_i i V E M L)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
let ?set01 = "{ i. i : L ` V & (i = 1 | i = 0)}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have a: "L ` V = ?A \<union> ?B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L ` V = {i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E

goal (1 subgoal):
 1. L ` V = {i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L ` V = {i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have "finite V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite V
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E

goal (1 subgoal):
 1. finite V
[PROOF STEP]
by (simp add: matching_def finite_graph_def)
[PROOF STATE]
proof (state)
this:
finite V

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have b: "sum ?g (?A \<union> ?B) = sum ?g ?A + sum ?g ?B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>{i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
[PROOF STEP]
using assms \<open>finite V\<close>
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E
finite V

goal (1 subgoal):
 1. (\<Sum>i\<in>{i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
[PROOF STEP]
by (auto intro: sum.union_disjoint)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>{i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have 1: "?Mi = ?M01+ ?Mgr1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
[PROOF STEP]
using assms a b
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E
L ` V = {i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}
(\<Sum>i\<in>{i \<in> L ` V. i = 1 \<or> i = 0} \<union> {i \<in> L ` V. 1 < i}. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
[PROOF STEP]
by (simp add: matching_def finite_graph_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have 0: "card (matching_i 0 V E M L) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (matching_i 0 V E M L) = 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E

goal (1 subgoal):
 1. card (matching_i 0 V E M L) = 0
[PROOF STEP]
by (simp add: matching_i_def)
[PROOF STATE]
proof (state)
this:
card (matching_i 0 V E M L) = 0

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have 2: "?M01 \<le> N V L 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
assume a: "1 \<in> L`V"
[PROOF STATE]
proof (state)
this:
1 \<in> L ` V

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
have "?M01 = card (matching_i 1 V E M L)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
assume b: "0 \<in> L`V"
[PROOF STATE]
proof (state)
this:
0 \<in> L ` V

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
with a assms
[PROOF STATE]
proof (chain)
picking this:
1 \<in> L ` V
matching V E M
OSC L E
0 \<in> L ` V
[PROOF STEP]
have  "?set01 = {0, 1}"
[PROOF STATE]
proof (prove)
using this:
1 \<in> L ` V
matching V E M
OSC L E
0 \<in> L ` V

goal (1 subgoal):
 1. {i \<in> L ` V. i = 1 \<or> i = 0} = {0, 1}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {0, 1}

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {0, 1}

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
using assms 0
[PROOF STATE]
proof (prove)
using this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {0, 1}
matching V E M
OSC L E
card (matching_i 0 V E M L) = 0

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
assume b: "0 \<notin> L`V"
[PROOF STATE]
proof (state)
this:
0 \<notin> L ` V

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
with a
[PROOF STATE]
proof (chain)
picking this:
1 \<in> L ` V
0 \<notin> L ` V
[PROOF STEP]
have "?set01 = {1}"
[PROOF STATE]
proof (prove)
using this:
1 \<in> L ` V
0 \<notin> L ` V

goal (1 subgoal):
 1. {i \<in> L ` V. i = 1 \<or> i = 0} = {1}
[PROOF STEP]
by (auto simp del:One_nat_def)
[PROOF STATE]
proof (state)
this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {1}

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {1}

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
using assms a
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = card (matching_i 1 V E M L)
matching V E M
OSC L E
1 \<in> L ` V

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
by (simp del: One_nat_def, intro card_M1_le_NVL1)
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1

goal (1 subgoal):
 1. 1 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
assume a: "1 \<notin> L`V"
[PROOF STATE]
proof (state)
this:
1 \<notin> L ` V

goal (1 subgoal):
 1. 1 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
assume b: "0 \<in> L`V"
[PROOF STATE]
proof (state)
this:
0 \<in> L ` V

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
with a assms
[PROOF STATE]
proof (chain)
picking this:
1 \<notin> L ` V
matching V E M
OSC L E
0 \<in> L ` V
[PROOF STEP]
have  "?set01 = {0}"
[PROOF STATE]
proof (prove)
using this:
1 \<notin> L ` V
matching V E M
OSC L E
0 \<in> L ` V

goal (1 subgoal):
 1. {i \<in> L ` V. i = 1 \<or> i = 0} = {0}
[PROOF STEP]
by (auto simp del:One_nat_def)
[PROOF STATE]
proof (state)
this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {0}

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
 2. \<not> ?P \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {0}

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
using assms 0
[PROOF STATE]
proof (prove)
using this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {0}
matching V E M
OSC L E
card (matching_i 0 V E M L) = 0

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
assume b: "0 \<notin> L`V"
[PROOF STATE]
proof (state)
this:
0 \<notin> L ` V

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
with a
[PROOF STATE]
proof (chain)
picking this:
1 \<notin> L ` V
0 \<notin> L ` V
[PROOF STEP]
have "?set01 = {}"
[PROOF STATE]
proof (prove)
using this:
1 \<notin> L ` V
0 \<notin> L ` V

goal (1 subgoal):
 1. {i \<in> L ` V. i = 1 \<or> i = 0} = {}
[PROOF STEP]
by (auto simp del:One_nat_def)
[PROOF STATE]
proof (state)
this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {}

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {}
[PROOF STEP]
have "?M01 = (\<Sum>i\<in>{}. card (matching_i i V E M L))"
[PROOF STATE]
proof (prove)
using this:
{i \<in> L ` V. i = 1 \<or> i = 0} = {}

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = (\<Sum>i\<in>{}. card (matching_i i V E M L))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = (\<Sum>i\<in>{}. card (matching_i i V E M L))

goal (1 subgoal):
 1. 0 \<notin> L ` V \<Longrightarrow> (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) = (\<Sum>i\<in>{}. card (matching_i i V E M L))

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
have 3: "?Mgr1 \<le> (\<Sum>i|i\<in>L`V \<and> 1 < i. N V L i div 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matching V E M
OSC L E

goal (1 subgoal):
 1. (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)
[PROOF STEP]
by (intro sum_mono card_Mi_le_floor_div_2_NVLi, simp)
[PROOF STATE]
proof (state)
this:
(\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
(\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
(\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
using 1 2 3 assms
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
(\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) = (\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) + (\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L))
(\<Sum>i | i \<in> L ` V \<and> (i = 1 \<or> i = 0). card (matching_i i V E M L)) \<le> N V L 1
(\<Sum>i | i \<in> L ` V \<and> 1 < i. card (matching_i i V E M L)) \<le> (\<Sum>i | i \<in> L ` V \<and> 1 < i. N V L i div 2)
matching V E M
OSC L E

goal (1 subgoal):
 1. (\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
by (simp add: weight_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)

goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card M \<le> (\<Sum>i\<in>L ` V. card (matching_i i V E M L))
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card M \<le> (\<Sum>i\<in>L ` V. card (matching_i i V E M L))
(\<Sum>i\<in>L ` V. card (matching_i i V E M L)) \<le> weight {i \<in> L ` V. 1 < i} (N V L)

goal (1 subgoal):
 1. card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card M \<le> weight {i \<in> L ` V. 1 < i} (N V L)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mono_vimage_algebra:
  "sets M \<le> sets N \<Longrightarrow> sets (vimage_algebra X f M) \<subseteq> sets (vimage_algebra X f N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets M \<subseteq> sets N \<Longrightarrow> sets (vimage_algebra X f M) \<subseteq> sets (vimage_algebra X f N)
[PROOF STEP]
using sets.top[of "sigma X {f -` A \<inter> X |A. A \<in> sets N}"]
[PROOF STATE]
proof (prove)
using this:
space (sigma X {f -` A \<inter> X |A. A \<in> sets N}) \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})

goal (1 subgoal):
 1. sets M \<subseteq> sets N \<Longrightarrow> sets (vimage_algebra X f M) \<subseteq> sets (vimage_algebra X f N)
[PROOF STEP]
unfolding vimage_algebra_def
[PROOF STATE]
proof (prove)
using this:
space (sigma X {f -` A \<inter> X |A. A \<in> sets N}) \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})

goal (1 subgoal):
 1. sets M \<subseteq> sets N \<Longrightarrow> sets (sigma X {f -` A \<inter> X |A. A \<in> sets M}) \<subseteq> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})
[PROOF STEP]
apply (subst (asm) space_measure_of)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. sets M \<subseteq> sets N \<Longrightarrow> {f -` A \<inter> X |A. A \<in> sets N} \<subseteq> Pow X
 2. \<lbrakk>sets M \<subseteq> sets N; X \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})\<rbrakk> \<Longrightarrow> sets (sigma X {f -` A \<inter> X |A. A \<in> sets M}) \<subseteq> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})
[PROOF STEP]
apply auto []
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sets M \<subseteq> sets N; X \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})\<rbrakk> \<Longrightarrow> sets (sigma X {f -` A \<inter> X |A. A \<in> sets M}) \<subseteq> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})
[PROOF STEP]
apply (subst sigma_le_sets)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>sets M \<subseteq> sets N; X \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})\<rbrakk> \<Longrightarrow> {f -` A \<inter> X |A. A \<in> sets M} \<subseteq> Pow X
 2. \<lbrakk>sets M \<subseteq> sets N; X \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})\<rbrakk> \<Longrightarrow> X \<in> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N}) \<and> {f -` A \<inter> X |A. A \<in> sets M} \<subseteq> sets (sigma X {f -` A \<inter> X |A. A \<in> sets N})
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma mult_of_is_Units: "mult_of R = units_of R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mult_of R = units_of R
[PROOF STEP]
unfolding mult_of_def units_of_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lparr>carrier = carrier R - {\<zero>}, mult = (\<otimes>), one = \<one>\<rparr> = \<lparr>carrier = Units R, mult = (\<otimes>), one = \<one>\<rparr>
[PROOF STEP]
using field_Units
[PROOF STATE]
proof (prove)
using this:
Units R = carrier R - {\<zero>}

goal (1 subgoal):
 1. \<lparr>carrier = carrier R - {\<zero>}, mult = (\<otimes>), one = \<one>\<rparr> = \<lparr>carrier = Units R, mult = (\<otimes>), one = \<one>\<rparr>
[PROOF STEP]
by auto


[STATEMENT]
lemma homeomorphism_imp_closed_map:
  assumes hom: "homeomorphism S T f g"
    and oo: "closedin (top_of_set S) U"
  shows "closedin (top_of_set T) (f ` U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
from hom oo
[PROOF STATE]
proof (chain)
picking this:
homeomorphism S T f g
closedin (top_of_set S) U
[PROOF STEP]
have [simp]: "f ` U = T \<inter> g -` U"
[PROOF STATE]
proof (prove)
using this:
homeomorphism S T f g
closedin (top_of_set S) U

goal (1 subgoal):
 1. f ` U = T \<inter> g -` U
[PROOF STEP]
using closedin_subset
[PROOF STATE]
proof (prove)
using this:
homeomorphism S T f g
closedin (top_of_set S) U
closedin ?U ?S \<Longrightarrow> ?S \<subseteq> topspace ?U

goal (1 subgoal):
 1. f ` U = T \<inter> g -` U
[PROOF STEP]
by (fastforce simp: homeomorphism_def rev_image_eqI)
[PROOF STATE]
proof (state)
this:
f ` U = T \<inter> g -` U

goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
from hom
[PROOF STATE]
proof (chain)
picking this:
homeomorphism S T f g
[PROOF STEP]
have "continuous_on T g"
[PROOF STATE]
proof (prove)
using this:
homeomorphism S T f g

goal (1 subgoal):
 1. continuous_on T g
[PROOF STEP]
unfolding homeomorphism_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>S. g (f x) = x) \<and> f ` S = T \<and> continuous_on S f \<and> (\<forall>y\<in>T. f (g y) = y) \<and> g ` T = S \<and> continuous_on T g

goal (1 subgoal):
 1. continuous_on T g
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
continuous_on T g

goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
continuous_on T g

goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
have "g ` T = S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` T = S
[PROOF STEP]
by (metis hom homeomorphism_def)
[PROOF STATE]
proof (state)
this:
g ` T = S

goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
continuous_on T g
g ` T = S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
continuous_on T g
g ` T = S

goal (1 subgoal):
 1. closedin (top_of_set T) (f ` U)
[PROOF STEP]
by (simp add: continuous_on_closed oo)
[PROOF STATE]
proof (state)
this:
closedin (top_of_set T) (f ` U)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma \<Delta>_trancl_inv:
  "(\<Delta>_trancl A B)|\<inverse>| = \<Delta>_trancl B A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Delta>_trancl A B)|\<inverse>| = \<Delta>_trancl B A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Delta>_trancl A B)|\<inverse>| = \<Delta>_trancl B A
[PROOF STEP]
have [dest]: "(p, q) |\<in>| \<Delta>_trancl A B \<Longrightarrow> (q, p) |\<in>| \<Delta>_trancl B A" for p q A B
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p, q) |\<in>| \<Delta>_trancl A B \<Longrightarrow> (q, p) |\<in>| \<Delta>_trancl B A
[PROOF STEP]
by (induct rule: \<Delta>_trancl_induct) (auto intro: \<Delta>_trancl_intros)
[PROOF STATE]
proof (state)
this:
(?p1, ?q1) |\<in>| \<Delta>_trancl ?A1 ?B1 \<Longrightarrow> (?q1, ?p1) |\<in>| \<Delta>_trancl ?B1 ?A1

goal (1 subgoal):
 1. (\<Delta>_trancl A B)|\<inverse>| = \<Delta>_trancl B A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Delta>_trancl A B)|\<inverse>| = \<Delta>_trancl B A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Delta>_trancl A B)|\<inverse>| = \<Delta>_trancl B A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma affine_parallel_assoc:
  assumes "affine_parallel A B"
    and "affine_parallel B C"
  shows "affine_parallel A C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
affine_parallel A B
affine_parallel B C
[PROOF STEP]
obtain ab where "B = (\<lambda>x. ab + x) ` A"
[PROOF STATE]
proof (prove)
using this:
affine_parallel A B
affine_parallel B C

goal (1 subgoal):
 1. (\<And>ab. B = (+) ab ` A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding affine_parallel_def
[PROOF STATE]
proof (prove)
using this:
\<exists>a. B = (+) a ` A
\<exists>a. C = (+) a ` B

goal (1 subgoal):
 1. (\<And>ab. B = (+) ab ` A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
B = (+) ab ` A

goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
B = (+) ab ` A

goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
affine_parallel A B
affine_parallel B C
[PROOF STEP]
obtain bc where "C = (\<lambda>x. bc + x) ` B"
[PROOF STATE]
proof (prove)
using this:
affine_parallel A B
affine_parallel B C

goal (1 subgoal):
 1. (\<And>bc. C = (+) bc ` B \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding affine_parallel_def
[PROOF STATE]
proof (prove)
using this:
\<exists>a. B = (+) a ` A
\<exists>a. C = (+) a ` B

goal (1 subgoal):
 1. (\<And>bc. C = (+) bc ` B \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
C = (+) bc ` B

goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
B = (+) ab ` A
C = (+) bc ` B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
B = (+) ab ` A
C = (+) bc ` B

goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
using translation_assoc[of bc ab A]
[PROOF STATE]
proof (prove)
using this:
B = (+) ab ` A
C = (+) bc ` B
(+) bc ` (+) ab ` A = (+) (ab + bc) ` A

goal (1 subgoal):
 1. affine_parallel A C
[PROOF STEP]
unfolding affine_parallel_def
[PROOF STATE]
proof (prove)
using this:
B = (+) ab ` A
C = (+) bc ` B
(+) bc ` (+) ab ` A = (+) (ab + bc) ` A

goal (1 subgoal):
 1. \<exists>a. C = (+) a ` A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
affine_parallel A C

goal:
No subgoals!
[PROOF STEP]
qed