[STATEMENT]
lemma GreenThm_typeI_divisible_region_boundary_gen:
  assumes valid_typeI_div: "valid_typeI_division s two_chain" and
    f_analytically_valid: "\<forall>twoC \<in> two_chain. analytically_valid (cubeImage twoC) (\<lambda>a. F(a) \<bullet> i) j" and
    only_vertical_division:
    "only_vertical_division \<gamma> two_chain"
  shows "integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F(a) \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
let ?F_b' = "partial_vector_derivative (\<lambda>a. F(a) \<bullet> i)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have all_two_cubes_have_four_distict_edges: "\<forall>twoCube \<in> two_chain. card (boundary twoCube) = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>twoCube\<in>two_chain. card (boundary twoCube) = 4
[PROOF STEP]
using valid_typeI_div valid_two_chain_def valid_two_cube_def
[PROOF STATE]
proof (prove)
using this:
valid_typeI_division s two_chain
valid_two_chain ?twoChain \<equiv> (\<forall>twoCube\<in>?twoChain. valid_two_cube twoCube) \<and> pairwise (\<lambda>c1 c2. boundary c1 \<inter> boundary c2 = {}) ?twoChain \<and> inj_on cubeImage ?twoChain
valid_two_cube ?twoC \<equiv> card (boundary ?twoC) = 4

goal (1 subgoal):
 1. \<forall>twoCube\<in>two_chain. card (boundary twoCube) = 4
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>twoCube\<in>two_chain. card (boundary twoCube) = 4

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have no_shared_edges_have_similar_orientations:
    "\<forall>twoCube1 \<in> two_chain. \<forall>twoCube2 \<in> two_chain.
         twoCube1 \<noteq> twoCube2 \<longrightarrow> boundary twoCube1 \<inter> boundary twoCube2 = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>twoCube1\<in>two_chain. \<forall>twoCube2\<in>two_chain. twoCube1 \<noteq> twoCube2 \<longrightarrow> boundary twoCube1 \<inter> boundary twoCube2 = {}
[PROOF STEP]
using valid_typeI_div valid_two_chain_def
[PROOF STATE]
proof (prove)
using this:
valid_typeI_division s two_chain
valid_two_chain ?twoChain \<equiv> (\<forall>twoCube\<in>?twoChain. valid_two_cube twoCube) \<and> pairwise (\<lambda>c1 c2. boundary c1 \<inter> boundary c2 = {}) ?twoChain \<and> inj_on cubeImage ?twoChain

goal (1 subgoal):
 1. \<forall>twoCube1\<in>two_chain. \<forall>twoCube2\<in>two_chain. twoCube1 \<noteq> twoCube2 \<longrightarrow> boundary twoCube1 \<inter> boundary twoCube2 = {}
[PROOF STEP]
by (auto simp add: pairwise_def)
[PROOF STATE]
proof (state)
this:
\<forall>twoCube1\<in>two_chain. \<forall>twoCube2\<in>two_chain. twoCube1 \<noteq> twoCube2 \<longrightarrow> boundary twoCube1 \<inter> boundary twoCube2 = {}

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
(*Proving that line_integral on the x axis is 0 for the vertical 1-cubes*)
[PROOF STATE]
proof (state)
this:
\<forall>twoCube1\<in>two_chain. \<forall>twoCube2\<in>two_chain. twoCube1 \<noteq> twoCube2 \<longrightarrow> boundary twoCube1 \<inter> boundary twoCube2 = {}

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have vert_line_integral_zero:
    "one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) = 0
[PROOF STEP]
proof (simp add: one_chain_line_integral_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>x\<in>two_chain_vertical_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
[PROOF STEP]
have "line_integral F {i} (snd oneCube) = 0"
      if oneCube: "oneCube \<in> two_chain_vertical_boundary(two_chain)" for oneCube
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
obtain x y1 y2 k where vert_edge_def: "oneCube = (k, (\<lambda>t::real. (x::real, (1 - t) * (y2) + t * y1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k x y2 y1. oneCube = (k, \<lambda>t. (x, (1 - t) * y2 + t * y1)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using valid_typeI_div oneCube
[PROOF STATE]
proof (prove)
using this:
valid_typeI_division s two_chain
oneCube \<in> two_chain_vertical_boundary two_chain

goal (1 subgoal):
 1. (\<And>k x y2 y1. oneCube = (k, \<lambda>t. (x, (1 - t) * y2 + t * y1)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add: typeI_twoCube_def two_chain_vertical_boundary_def vertical_boundary_def)
[PROOF STATE]
proof (state)
this:
oneCube = (k, \<lambda>t. (x, (1 - t) * y2 + t * y1))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
let ?vert_edge = "(snd oneCube)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
have vert_edge_x_const: "\<forall>t. (?vert_edge t) \<bullet> i = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>t. snd oneCube t \<bullet> i = x
[PROOF STEP]
by (simp add: i_is_x_axis vert_edge_def)
[PROOF STATE]
proof (state)
this:
\<forall>t. snd oneCube t \<bullet> i = x

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
have vert_edge_is_straight_path: "?vert_edge = (\<lambda>t. (x, y2 + t * (y1 - y2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd oneCube = (\<lambda>t. (x, y2 + t * (y1 - y2)))
[PROOF STEP]
by (auto simp: vert_edge_def algebra_simps)
[PROOF STATE]
proof (state)
this:
snd oneCube = (\<lambda>t. (x, y2 + t * (y1 - y2)))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
by (simp add: i_is_x_axis line_integral_on_pair_straight_path(1) mult.commute straight_path_diffrentiable_x vert_edge_is_straight_path)
[PROOF STATE]
proof (state)
this:
line_integral F {i} (snd oneCube) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?oneCube \<in> two_chain_vertical_boundary two_chain \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>two_chain_vertical_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?oneCube \<in> two_chain_vertical_boundary two_chain \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0
[PROOF STEP]
show "(\<Sum>x\<in>two_chain_vertical_boundary two_chain. case x of (k, g) \<Rightarrow> k * line_integral F {i} g) = 0"
[PROOF STATE]
proof (prove)
using this:
?oneCube \<in> two_chain_vertical_boundary two_chain \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>two_chain_vertical_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
[PROOF STEP]
using comm_monoid_add_class.sum.neutral
[PROOF STATE]
proof (prove)
using this:
?oneCube \<in> two_chain_vertical_boundary two_chain \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0
\<forall>x\<in>?A. ?g x = (0::?'a) \<Longrightarrow> sum ?g ?A = (0::?'a)

goal (1 subgoal):
 1. (\<Sum>x\<in>two_chain_vertical_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
[PROOF STEP]
by (simp add: prod.case_eq_if)
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>two_chain_vertical_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) = 0

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
(*then, the x axis line_integral on the boundaries of the twoCube is equal to the line_integral on the horizontal boundaries of the twoCube \<longrightarrow> 1*)
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) = 0

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have boundary_is_finite: "finite (two_chain_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (two_chain_boundary two_chain)
[PROOF STEP]
unfolding two_chain_boundary_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (\<Union> (boundary ` two_chain))
[PROOF STEP]
proof (rule finite_UN_I)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite two_chain
 2. \<And>a. a \<in> two_chain \<Longrightarrow> finite (boundary a)
[PROOF STEP]
show "finite two_chain"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite two_chain
[PROOF STEP]
using assms(1) finite_imageD gen_division_def valid_two_chain_def
[PROOF STATE]
proof (prove)
using this:
valid_typeI_division s two_chain
\<lbrakk>finite (?f ` ?A); inj_on ?f ?A\<rbrakk> \<Longrightarrow> finite ?A
gen_division ?s ?S \<equiv> finite ?S \<and> \<Union> ?S = ?s \<and> pairwise (\<lambda>X Y. negligible (X \<inter> Y)) ?S
valid_two_chain ?twoChain \<equiv> (\<forall>twoCube\<in>?twoChain. valid_two_cube twoCube) \<and> pairwise (\<lambda>c1 c2. boundary c1 \<inter> boundary c2 = {}) ?twoChain \<and> inj_on cubeImage ?twoChain

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

goal (1 subgoal):
 1. \<And>a. a \<in> two_chain \<Longrightarrow> finite (boundary a)
[PROOF STEP]
show "\<And>a. a \<in> two_chain \<Longrightarrow> finite (boundary a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. a \<in> two_chain \<Longrightarrow> finite (boundary a)
[PROOF STEP]
by (simp add: boundary_def horizontal_boundary_def vertical_boundary_def)
[PROOF STATE]
proof (state)
this:
?a \<in> two_chain \<Longrightarrow> finite (boundary ?a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite (two_chain_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have boundary_is_vert_hor: "two_chain_boundary two_chain =
                              (two_chain_vertical_boundary two_chain) \<union> (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. two_chain_boundary two_chain = two_chain_vertical_boundary two_chain \<union> two_chain_horizontal_boundary two_chain
[PROOF STEP]
by (auto simp add: two_chain_boundary_def two_chain_vertical_boundary_def two_chain_horizontal_boundary_def boundary_def)
[PROOF STATE]
proof (state)
this:
two_chain_boundary two_chain = two_chain_vertical_boundary two_chain \<union> two_chain_horizontal_boundary two_chain

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
two_chain_boundary two_chain = two_chain_vertical_boundary two_chain \<union> two_chain_horizontal_boundary two_chain
[PROOF STEP]
have hor_vert_finite:
    "finite (two_chain_vertical_boundary two_chain)"
    "finite (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
using this:
two_chain_boundary two_chain = two_chain_vertical_boundary two_chain \<union> two_chain_horizontal_boundary two_chain

goal (1 subgoal):
 1. finite (two_chain_vertical_boundary two_chain) &&& finite (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
using boundary_is_finite
[PROOF STATE]
proof (prove)
using this:
two_chain_boundary two_chain = two_chain_vertical_boundary two_chain \<union> two_chain_horizontal_boundary two_chain
finite (two_chain_boundary two_chain)

goal (1 subgoal):
 1. finite (two_chain_vertical_boundary two_chain) &&& finite (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (two_chain_vertical_boundary two_chain)
finite (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have horiz_verti_disjoint:
    "(two_chain_vertical_boundary two_chain) \<inter> (two_chain_horizontal_boundary two_chain) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. two_chain_vertical_boundary two_chain \<inter> two_chain_horizontal_boundary two_chain = {}
[PROOF STEP]
proof (simp add: two_chain_vertical_boundary_def two_chain_horizontal_boundary_def horizontal_boundary_def
        vertical_boundary_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>xa. x (xa, 0)), (- 1, \<lambda>xa. x (xa, 1))}) = {}
[PROOF STEP]
show "(\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1::int, \<lambda>y. x (1::real, y))})
        \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}
[PROOF STEP]
have "{(- 1, \<lambda>y. twoCube (0, y)), (1::int, \<lambda>y. twoCube (1, y))} \<inter>
            {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}"
        if "twoCube \<in> two_chain" "twoCube2 \<in> two_chain" for twoCube twoCube2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
proof (cases "twoCube = twoCube2")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. twoCube = twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
 2. twoCube \<noteq> twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
twoCube = twoCube2

goal (2 subgoals):
 1. twoCube = twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
 2. twoCube \<noteq> twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
have "card {(- 1::int, \<lambda>y. twoCube2 (0, y)), (1::int, \<lambda>y. twoCube2 (1, y)), (1, \<lambda>x. twoCube2 (x, 0)), (- 1, \<lambda>x. twoCube2 (x, 1))} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {(- 1, \<lambda>y. twoCube2 (0, y)), (1, \<lambda>y. twoCube2 (1, y)), (1, \<lambda>x. twoCube2 (x, 0)), (- 1, \<lambda>x. twoCube2 (x, 1))} = 4
[PROOF STEP]
using all_two_cubes_have_four_distict_edges that(2)
[PROOF STATE]
proof (prove)
using this:
\<forall>twoCube\<in>two_chain. card (boundary twoCube) = 4
twoCube2 \<in> two_chain

goal (1 subgoal):
 1. card {(- 1, \<lambda>y. twoCube2 (0, y)), (1, \<lambda>y. twoCube2 (1, y)), (1, \<lambda>x. twoCube2 (x, 0)), (- 1, \<lambda>x. twoCube2 (x, 1))} = 4
[PROOF STEP]
by (auto simp add: boundary_def vertical_boundary_def horizontal_boundary_def)
[PROOF STATE]
proof (state)
this:
card {(- 1, \<lambda>y. twoCube2 (0, y)), (1, \<lambda>y. twoCube2 (1, y)), (1, \<lambda>x. twoCube2 (x, 0)), (- 1, \<lambda>x. twoCube2 (x, 1))} = 4

goal (2 subgoals):
 1. twoCube = twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
 2. twoCube \<noteq> twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card {(- 1, \<lambda>y. twoCube2 (0, y)), (1, \<lambda>y. twoCube2 (1, y)), (1, \<lambda>x. twoCube2 (x, 0)), (- 1, \<lambda>x. twoCube2 (x, 1))} = 4
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card {(- 1, \<lambda>y. twoCube2 (0, y)), (1, \<lambda>y. twoCube2 (1, y)), (1, \<lambda>x. twoCube2 (x, 0)), (- 1, \<lambda>x. twoCube2 (x, 1))} = 4

goal (1 subgoal):
 1. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
by (auto simp: card_insert_if True split: if_split_asm)
[PROOF STATE]
proof (state)
this:
{(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}

goal (1 subgoal):
 1. twoCube \<noteq> twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. twoCube \<noteq> twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
twoCube \<noteq> twoCube2

goal (1 subgoal):
 1. twoCube \<noteq> twoCube2 \<Longrightarrow> {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
twoCube \<noteq> twoCube2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
twoCube \<noteq> twoCube2

goal (1 subgoal):
 1. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
using no_shared_edges_have_similar_orientations
[PROOF STATE]
proof (prove)
using this:
twoCube \<noteq> twoCube2
\<forall>twoCube1\<in>two_chain. \<forall>twoCube2\<in>two_chain. twoCube1 \<noteq> twoCube2 \<longrightarrow> boundary twoCube1 \<inter> boundary twoCube2 = {}

goal (1 subgoal):
 1. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}
[PROOF STEP]
by (simp add: that boundary_def vertical_boundary_def horizontal_boundary_def)
[PROOF STATE]
proof (state)
this:
{(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))} \<inter> {(1, \<lambda>y. twoCube2 (y, 0)), (- 1, \<lambda>y. twoCube2 (y, 1))} = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?twoCube \<in> two_chain; ?twoCube2.0 \<in> two_chain\<rbrakk> \<Longrightarrow> {(- 1, \<lambda>y. ?twoCube (0, y)), (1, \<lambda>y. ?twoCube (1, y))} \<inter> {(1, \<lambda>y. ?twoCube2.0 (y, 0)), (- 1, \<lambda>y. ?twoCube2.0 (y, 1))} = {}

goal (1 subgoal):
 1. (\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?twoCube \<in> two_chain; ?twoCube2.0 \<in> two_chain\<rbrakk> \<Longrightarrow> {(- 1, \<lambda>y. ?twoCube (0, y)), (1, \<lambda>y. ?twoCube (1, y))} \<inter> {(1, \<lambda>y. ?twoCube2.0 (y, 0)), (- 1, \<lambda>y. ?twoCube2.0 (y, 1))} = {}
[PROOF STEP]
have "\<Union> ((\<lambda>twoCube. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))}) ` two_chain)
               \<inter> \<Union> ((\<lambda>twoCube. {(1::int, \<lambda>y. twoCube (y, 0)), (- 1, \<lambda>y. twoCube (y, 1))}) ` two_chain)
                 = {}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?twoCube \<in> two_chain; ?twoCube2.0 \<in> two_chain\<rbrakk> \<Longrightarrow> {(- 1, \<lambda>y. ?twoCube (0, y)), (1, \<lambda>y. ?twoCube (1, y))} \<inter> {(1, \<lambda>y. ?twoCube2.0 (y, 0)), (- 1, \<lambda>y. ?twoCube2.0 (y, 1))} = {}

goal (1 subgoal):
 1. (\<Union>twoCube\<in>two_chain. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))}) \<inter> (\<Union>twoCube\<in>two_chain. {(1, \<lambda>y. twoCube (y, 0)), (- 1, \<lambda>y. twoCube (y, 1))}) = {}
[PROOF STEP]
using Complete_Lattices.Union_disjoint
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?twoCube \<in> two_chain; ?twoCube2.0 \<in> two_chain\<rbrakk> \<Longrightarrow> {(- 1, \<lambda>y. ?twoCube (0, y)), (1, \<lambda>y. ?twoCube (1, y))} \<inter> {(1, \<lambda>y. ?twoCube2.0 (y, 0)), (- 1, \<lambda>y. ?twoCube2.0 (y, 1))} = {}
(\<Union> ?C \<inter> ?A = {}) = (\<forall>B\<in>?C. B \<inter> ?A = {})

goal (1 subgoal):
 1. (\<Union>twoCube\<in>two_chain. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))}) \<inter> (\<Union>twoCube\<in>two_chain. {(1, \<lambda>y. twoCube (y, 0)), (- 1, \<lambda>y. twoCube (y, 1))}) = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(\<Union>twoCube\<in>two_chain. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))}) \<inter> (\<Union>twoCube\<in>two_chain. {(1, \<lambda>y. twoCube (y, 0)), (- 1, \<lambda>y. twoCube (y, 1))}) = {}

goal (1 subgoal):
 1. (\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<Union>twoCube\<in>two_chain. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))}) \<inter> (\<Union>twoCube\<in>two_chain. {(1, \<lambda>y. twoCube (y, 0)), (- 1, \<lambda>y. twoCube (y, 1))}) = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Union>twoCube\<in>two_chain. {(- 1, \<lambda>y. twoCube (0, y)), (1, \<lambda>y. twoCube (1, y))}) \<inter> (\<Union>twoCube\<in>two_chain. {(1, \<lambda>y. twoCube (y, 0)), (- 1, \<lambda>y. twoCube (y, 1))}) = {}

goal (1 subgoal):
 1. (\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Union>x\<in>two_chain. {(- 1, \<lambda>y. x (0, y)), (1, \<lambda>y. x (1, y))}) \<inter> (\<Union>x\<in>two_chain. {(1, \<lambda>y. x (y, 0)), (- 1, \<lambda>y. x (y, 1))}) = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
two_chain_vertical_boundary two_chain \<inter> two_chain_horizontal_boundary two_chain = {}

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have "one_chain_line_integral F {i} (two_chain_boundary two_chain)
         = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) +
           one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) + one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
using boundary_is_vert_hor horiz_verti_disjoint
[PROOF STATE]
proof (prove)
using this:
two_chain_boundary two_chain = two_chain_vertical_boundary two_chain \<union> two_chain_horizontal_boundary two_chain
two_chain_vertical_boundary two_chain \<inter> two_chain_horizontal_boundary two_chain = {}

goal (1 subgoal):
 1. one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) + one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
by (auto simp add: one_chain_line_integral_def hor_vert_finite sum.union_disjoint)
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) + one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) + one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have x_axis_line_integral_is_only_horizontal:
    "one_chain_line_integral F {i} (two_chain_boundary two_chain)
     = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) + one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
using vert_line_integral_zero
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) + one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
one_chain_line_integral F {i} (two_chain_vertical_boundary two_chain) = 0

goal (1 subgoal):
 1. one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
(*Since \<gamma> \<subseteq> the boundary of the 2-chain and the horizontal boundaries are \<subseteq> \<gamma>, then there is some \<V> \<subseteq> \<partial>\<^sub>V(2-\<C>) such that \<gamma> = \<V> \<union> \<partial>\<^sub>H(2-\<C>)*)
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
obtain \<H> \<V> where hv_props: "finite \<V>"
    "(\<forall>(k,\<gamma>) \<in> \<V>. (\<exists>(k', \<gamma>') \<in> two_chain_vertical_boundary two_chain.
        (\<exists>a \<in> {0 .. 1}. \<exists>b \<in> {0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma>)))" "\<gamma> = \<H> \<union> \<V>"
    "(common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>)
     \<or> common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)"
    "finite \<H>"
    "boundary_chain \<H>"
    "\<forall>(k,\<gamma>)\<in>\<H>. valid_path \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<V> \<H>. \<lbrakk>finite \<V>; \<forall>(k, \<gamma>)\<in>\<V>. \<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma>; \<gamma> = \<H> \<union> \<V>; common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H> \<or> common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain); finite \<H>; boundary_chain \<H>; \<forall>(k, \<gamma>)\<in>\<H>. valid_path \<gamma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using only_vertical_division
[PROOF STATE]
proof (prove)
using this:
only_vertical_division \<gamma> two_chain

goal (1 subgoal):
 1. (\<And>\<V> \<H>. \<lbrakk>finite \<V>; \<forall>(k, \<gamma>)\<in>\<V>. \<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma>; \<gamma> = \<H> \<union> \<V>; common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H> \<or> common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain); finite \<H>; boundary_chain \<H>; \<forall>(k, \<gamma>)\<in>\<H>. valid_path \<gamma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add:  only_vertical_division_def)
[PROOF STATE]
proof (state)
this:
finite \<V>
\<forall>(k, \<gamma>)\<in>\<V>. \<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma>
\<gamma> = \<H> \<union> \<V>
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H> \<or> common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)
finite \<H>
boundary_chain \<H>
\<forall>(k, \<gamma>)\<in>\<H>. valid_path \<gamma>

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have "finite {i}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {i}

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite {i}
[PROOF STEP]
have eq_integrals: " one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
using this:
finite {i}

goal (1 subgoal):
 1. one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
proof(cases "common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>finite {i}; common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
 2. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>

goal (2 subgoals):
 1. \<lbrakk>finite {i}; common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
 2. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>

goal (1 subgoal):
 1. one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
using gen_common_subdivision_imp_eq_line_integral(1)[OF True two_chain_horizontal_boundary_is_boundary_chain hv_props(6) _ hor_vert_finite(2) hv_props(5)]
        typeI_cube_line_integral_exists_boundary''
[PROOF STATE]
proof (prove)
using this:
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>
\<lbrakk>\<forall>(k, \<gamma>)\<in>two_chain_horizontal_boundary two_chain. line_integral_exists ?F ?basis \<gamma>; finite ?basis\<rbrakk> \<Longrightarrow> one_chain_line_integral ?F ?basis (two_chain_horizontal_boundary two_chain) = one_chain_line_integral ?F ?basis \<H>
\<forall>(k, \<gamma>)\<in>two_chain_horizontal_boundary two_chain. line_integral_exists F {i} \<gamma>

goal (1 subgoal):
 1. one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have integ_exis_horiz:
      "\<forall>(k,\<gamma>) \<in> two_chain_horizontal_boundary two_chain. line_integral_exists F {i} \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(k, \<gamma>)\<in>two_chain_horizontal_boundary two_chain. line_integral_exists F {i} \<gamma>
[PROOF STEP]
using typeI_cube_line_integral_exists_boundary'' assms
[PROOF STATE]
proof (prove)
using this:
\<forall>(k, \<gamma>)\<in>two_chain_horizontal_boundary two_chain. line_integral_exists F {i} \<gamma>
valid_typeI_division s two_chain
\<forall>twoC\<in>two_chain. analytically_valid (cubeImage twoC) (\<lambda>a. F a \<bullet> i) j
only_vertical_division \<gamma> two_chain

goal (1 subgoal):
 1. \<forall>(k, \<gamma>)\<in>two_chain_horizontal_boundary two_chain. line_integral_exists F {i} \<gamma>
[PROOF STEP]
by (fastforce simp add: valid_two_chain_def)
[PROOF STATE]
proof (state)
this:
\<forall>(k, \<gamma>)\<in>two_chain_horizontal_boundary two_chain. line_integral_exists F {i} \<gamma>

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have integ_exis: "\<forall>(k,\<gamma>) \<in> two_chain_boundary two_chain. line_integral_exists F {i} \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(k, \<gamma>)\<in>two_chain_boundary two_chain. line_integral_exists F {i} \<gamma>
[PROOF STEP]
using typeI_cube_line_integral_exists_boundary
[PROOF STATE]
proof (prove)
using this:
\<forall>(k, \<gamma>)\<in>two_chain_boundary two_chain. line_integral_exists F {i} \<gamma>

goal (1 subgoal):
 1. \<forall>(k, \<gamma>)\<in>two_chain_boundary two_chain. line_integral_exists F {i} \<gamma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>(k, \<gamma>)\<in>two_chain_boundary two_chain. line_integral_exists F {i} \<gamma>

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have valid_paths: "\<forall>(k,\<gamma>) \<in> two_chain_vertical_boundary two_chain. valid_path \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(k, \<gamma>)\<in>two_chain_vertical_boundary two_chain. valid_path \<gamma>
[PROOF STEP]
using typeI_edges_are_valid_paths assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>typeI_twoCube ?twoC; (?k, ?\<gamma>) \<in> boundary ?twoC\<rbrakk> \<Longrightarrow> valid_path ?\<gamma>
valid_typeI_division s two_chain
\<forall>twoC\<in>two_chain. analytically_valid (cubeImage twoC) (\<lambda>a. F a \<bullet> i) j
only_vertical_division \<gamma> two_chain

goal (1 subgoal):
 1. \<forall>(k, \<gamma>)\<in>two_chain_vertical_boundary two_chain. valid_path \<gamma>
[PROOF STEP]
by (fastforce simp add: two_chain_boundary_def two_chain_vertical_boundary_def boundary_def)
[PROOF STATE]
proof (state)
this:
\<forall>(k, \<gamma>)\<in>two_chain_vertical_boundary two_chain. valid_path \<gamma>

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have integ_exis_vert:
      "(\<And>k \<gamma>. (\<exists>(k', \<gamma>') \<in> two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma>) \<Longrightarrow>
                                    line_integral_exists F {i} \<gamma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>k \<gamma>. \<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma> \<Longrightarrow> line_integral_exists F {i} \<gamma>
[PROOF STEP]
using integ_exis valid_paths line_integral_exists_subpath[of "F" "{i}"]
[PROOF STATE]
proof (prove)
using this:
\<forall>(k, \<gamma>)\<in>two_chain_boundary two_chain. line_integral_exists F {i} \<gamma>
\<forall>(k, \<gamma>)\<in>two_chain_vertical_boundary two_chain. valid_path \<gamma>
\<lbrakk>line_integral_exists F {i} ?g; valid_path ?g; ?u \<in> {0..1}; ?v \<in> {0..1}; ?u \<le> ?v\<rbrakk> \<Longrightarrow> line_integral_exists F {i} (subpath ?u ?v ?g)

goal (1 subgoal):
 1. \<And>k \<gamma>. \<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma> \<Longrightarrow> line_integral_exists F {i} \<gamma>
[PROOF STEP]
by (fastforce simp add: two_chain_boundary_def two_chain_vertical_boundary_def
          two_chain_horizontal_boundary_def boundary_def)
[PROOF STATE]
proof (state)
this:
\<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = ?\<gamma> \<Longrightarrow> line_integral_exists F {i} ?\<gamma>

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have finite_i: "finite {i}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {i}

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have i: "{i} \<subseteq> Basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {i} \<subseteq> Basis
[PROOF STEP]
using i_is_x_axis real_pair_basis
[PROOF STATE]
proof (prove)
using this:
i = (1, 0)
Basis = {(1, 0), (0, 1)}

goal (1 subgoal):
 1. {i} \<subseteq> Basis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{i} \<subseteq> Basis

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have ii: " \<forall>(k2, \<gamma>2)\<in>two_chain_horizontal_boundary two_chain. \<forall>b\<in>{i}. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(k2, \<gamma>2)\<in>two_chain_horizontal_boundary two_chain. \<forall>b\<in>{i}. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)
[PROOF STEP]
using assms(1) field_cont_on_typeI_region_cont_on_edges assms(2)
[PROOF STATE]
proof (prove)
using this:
valid_typeI_division s two_chain
\<lbrakk>typeI_twoCube ?twoC; continuous_on (cubeImage ?twoC) ?F; (?k, ?\<gamma>) \<in> boundary ?twoC\<rbrakk> \<Longrightarrow> continuous_on (?\<gamma> ` {0..1}) ?F
\<forall>twoC\<in>two_chain. analytically_valid (cubeImage twoC) (\<lambda>a. F a \<bullet> i) j

goal (1 subgoal):
 1. \<forall>(k2, \<gamma>2)\<in>two_chain_horizontal_boundary two_chain. \<forall>b\<in>{i}. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)
[PROOF STEP]
by (fastforce simp add: analytically_valid_def two_chain_horizontal_boundary_def boundary_def path_image_def)
[PROOF STATE]
proof (state)
this:
\<forall>(k2, \<gamma>2)\<in>two_chain_horizontal_boundary two_chain. \<forall>b\<in>{i}. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have *: "common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
using hv_props(4) False
[PROOF STATE]
proof (prove)
using this:
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H> \<or> common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)
\<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>

goal (1 subgoal):
 1. common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. \<lbrakk>finite {i}; \<not> common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H>\<rbrakk> \<Longrightarrow> one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
show "one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
using common_reparam_exists_imp_eq_line_integral(1)[OF finite_i hv_props(5) hor_vert_finite(2) hv_props(6) two_chain_horizontal_boundary_is_boundary_chain ii * hv_props(7) type_I_chain_horiz_bound_valid]
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
(*Since \<V> \<subseteq> \<partial>\<^sub>H(2-\<C>), then the line_integral on the x axis along \<V> is 0, and from 1 Q.E.D. *)
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
have line_integral_on_path:
    "one_chain_line_integral F {i} \<gamma> =
     one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
proof (auto simp add: one_chain_line_integral_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)
[PROOF STEP]
have "line_integral F {i} (snd oneCube) = 0" if oneCube: "oneCube \<in> \<V>" for oneCube
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
obtain k \<gamma> where k_gamma: "(k,\<gamma>) = oneCube"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k \<gamma>. (k, \<gamma>) = oneCube \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis coeff_cube_to_path.cases)
[PROOF STATE]
proof (state)
this:
(k, \<gamma>) = oneCube

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(k, \<gamma>) = oneCube
[PROOF STEP]
obtain k' \<gamma>' a b where kp_gammap:
        "(k'::int, \<gamma>') \<in> two_chain_vertical_boundary two_chain"
        "a \<in> {0 .. 1}"
        "b \<in> {0..1}"
        "subpath a b \<gamma>' = \<gamma>"
[PROOF STATE]
proof (prove)
using this:
(k, \<gamma>) = oneCube

goal (1 subgoal):
 1. (\<And>k' \<gamma>'' a b. \<lbrakk>(k', \<gamma>'') \<in> two_chain_vertical_boundary two_chain; a \<in> {0..1}; b \<in> {0..1}; subpath a b \<gamma>'' = \<gamma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hv_props oneCube
[PROOF STATE]
proof (prove)
using this:
(k, \<gamma>) = oneCube
finite \<V>
\<forall>(k, \<gamma>)\<in>\<V>. \<exists>(k', \<gamma>')\<in>two_chain_vertical_boundary two_chain. \<exists>a\<in>{0..1}. \<exists>b\<in>{0..1}. a \<le> b \<and> subpath a b \<gamma>' = \<gamma>
\<gamma> = \<H> \<union> \<V>
common_sudiv_exists (two_chain_horizontal_boundary two_chain) \<H> \<or> common_reparam_exists \<H> (two_chain_horizontal_boundary two_chain)
finite \<H>
boundary_chain \<H>
\<forall>(k, \<gamma>)\<in>\<H>. valid_path \<gamma>
oneCube \<in> \<V>

goal (1 subgoal):
 1. (\<And>k' \<gamma>'' a b. \<lbrakk>(k', \<gamma>'') \<in> two_chain_vertical_boundary two_chain; a \<in> {0..1}; b \<in> {0..1}; subpath a b \<gamma>'' = \<gamma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (smt case_prodE split_conv)
[PROOF STATE]
proof (state)
this:
(k', \<gamma>') \<in> two_chain_vertical_boundary two_chain
a \<in> {0..1}
b \<in> {0..1}
subpath a b \<gamma>' = \<gamma>

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
obtain x y1 y2 where vert_edge_def: "(k',\<gamma>') = (k', (\<lambda>t::real. (x::real, (1 - t) * (y2) + t * y1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x y2 y1. (k', \<gamma>') = (k', \<lambda>t. (x, (1 - t) * y2 + t * y1)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using valid_typeI_div kp_gammap
[PROOF STATE]
proof (prove)
using this:
valid_typeI_division s two_chain
(k', \<gamma>') \<in> two_chain_vertical_boundary two_chain
a \<in> {0..1}
b \<in> {0..1}
subpath a b \<gamma>' = \<gamma>

goal (1 subgoal):
 1. (\<And>x y2 y1. (k', \<gamma>') = (k', \<lambda>t. (x, (1 - t) * y2 + t * y1)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add: typeI_twoCube_def two_chain_vertical_boundary_def vertical_boundary_def)
[PROOF STATE]
proof (state)
this:
(k', \<gamma>') = (k', \<lambda>t. (x, (1 - t) * y2 + t * y1))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
have vert_edge_x_const: "\<forall>t. \<gamma> (t) \<bullet> i = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>t. \<gamma> t \<bullet> i = x
[PROOF STEP]
by (metis (no_types, lifting) Pair_inject fstI i_is_x_axis inner_Pair_0(2) kp_gammap(4) real_inner_1_right subpath_def vert_edge_def)
[PROOF STATE]
proof (state)
this:
\<forall>t. \<gamma> t \<bullet> i = x

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
have "\<gamma> = (\<lambda>t::real. (x::real, (1 - (b - a)*t - a) * (y2) + ((b-a)*t + a) * y1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<gamma> = (\<lambda>t. (x, (1 - (b - a) * t - a) * y2 + ((b - a) * t + a) * y1))
[PROOF STEP]
using vert_edge_def Product_Type.snd_conv Product_Type.fst_conv kp_gammap(4)
[PROOF STATE]
proof (prove)
using this:
(k', \<gamma>') = (k', \<lambda>t. (x, (1 - t) * y2 + t * y1))
snd (?x1.0, ?x2.0) = ?x2.0
fst (?x1.0, ?x2.0) = ?x1.0
subpath a b \<gamma>' = \<gamma>

goal (1 subgoal):
 1. \<gamma> = (\<lambda>t. (x, (1 - (b - a) * t - a) * y2 + ((b - a) * t + a) * y1))
[PROOF STEP]
by (simp add: subpath_def diff_diff_eq[symmetric])
[PROOF STATE]
proof (state)
this:
\<gamma> = (\<lambda>t. (x, (1 - (b - a) * t - a) * y2 + ((b - a) * t + a) * y1))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<gamma> = (\<lambda>t. (x, (1 - (b - a) * t - a) * y2 + ((b - a) * t + a) * y1))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
have "... = (\<lambda>t::real. (x::real, (1*y2 - a*y2) +  a*y1 + ((b-a)*y1 - (b - a)*y2)*t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>t. (x, (1 - (b - a) * t - a) * y2 + ((b - a) * t + a) * y1)) = (\<lambda>t. (x, 1 * y2 - a * y2 + a * y1 + ((b - a) * y1 - (b - a) * y2) * t))
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
(\<lambda>t. (x, (1 - (b - a) * t - a) * y2 + ((b - a) * t + a) * y1)) = (\<lambda>t. (x, 1 * y2 - a * y2 + a * y1 + ((b - a) * y1 - (b - a) * y2) * t))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<gamma> = (\<lambda>t. (x, 1 * y2 - a * y2 + a * y1 + ((b - a) * y1 - (b - a) * y2) * t))
[PROOF STEP]
have vert_edge_is_straight_path:
        "\<gamma> = (\<lambda>t::real. (x::real, (1*y2 - a*y2) +  a*y1 + ((b-a)*y1 - (b - a)*y2)*t))"
[PROOF STATE]
proof (prove)
using this:
\<gamma> = (\<lambda>t. (x, 1 * y2 - a * y2 + a * y1 + ((b - a) * y1 - (b - a) * y2) * t))

goal (1 subgoal):
 1. \<gamma> = (\<lambda>t. (x, 1 * y2 - a * y2 + a * y1 + ((b - a) * y1 - (b - a) * y2) * t))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<gamma> = (\<lambda>t. (x, 1 * y2 - a * y2 + a * y1 + ((b - a) * y1 - (b - a) * y2) * t))

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
show "line_integral F {i} (snd oneCube) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
have "\<forall>x. \<gamma> differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. \<gamma> differentiable at x
[PROOF STEP]
by (simp add: straight_path_diffrentiable_x vert_edge_is_straight_path)
[PROOF STATE]
proof (state)
this:
\<forall>x. \<gamma> differentiable at x

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. \<gamma> differentiable at x
[PROOF STEP]
have "line_integral F {i} \<gamma> = 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. \<gamma> differentiable at x

goal (1 subgoal):
 1. line_integral F {i} \<gamma> = 0
[PROOF STEP]
using line_integral_on_pair_straight_path(1) vert_edge_x_const
[PROOF STATE]
proof (prove)
using this:
\<forall>x. \<gamma> differentiable at x
\<lbrakk>\<forall>x. ?\<gamma> x \<bullet> ?i = ?a; \<forall>x\<in>{0..1}. ?\<gamma> differentiable at x\<rbrakk> \<Longrightarrow> line_integral ?F {?i} ?\<gamma> = 0
\<forall>t. \<gamma> t \<bullet> i = x

goal (1 subgoal):
 1. line_integral F {i} \<gamma> = 0
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
line_integral F {i} \<gamma> = 0

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
line_integral F {i} \<gamma> = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
line_integral F {i} \<gamma> = 0

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
using Product_Type.snd_conv k_gamma
[PROOF STATE]
proof (prove)
using this:
line_integral F {i} \<gamma> = 0
snd (?x1.0, ?x2.0) = ?x2.0
(k, \<gamma>) = oneCube

goal (1 subgoal):
 1. line_integral F {i} (snd oneCube) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
line_integral F {i} (snd oneCube) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
line_integral F {i} (snd oneCube) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?oneCube \<in> \<V> \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?oneCube \<in> \<V> \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0
[PROOF STEP]
have "\<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> (k::int) * line_integral F {i} g) = 0"
[PROOF STATE]
proof (prove)
using this:
?oneCube \<in> \<V> \<Longrightarrow> line_integral F {i} (snd ?oneCube) = 0

goal (1 subgoal):
 1. \<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
[PROOF STEP]
show "(\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) =
               (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> of_int k * line_integral F {i} g)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)
[PROOF STEP]
using hv_props(1) hv_props(3) hv_props(5) sum_zero_set hor_vert_finite(2) eq_integrals
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0
finite \<V>
\<gamma> = \<H> \<union> \<V>
finite \<H>
\<lbrakk>\<forall>x\<in>?s. ?f x = (0::?'b); finite ?s; finite ?t\<rbrakk> \<Longrightarrow> sum ?f (?s \<union> ?t) = sum ?f ?t
finite (two_chain_horizontal_boundary two_chain)
one_chain_line_integral F {i} \<H> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. (\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)
[PROOF STEP]
apply(auto simp add: one_chain_line_integral_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>\<V>. (case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = 0; finite \<V>; \<gamma> = \<H> \<union> \<V>; finite \<H>; \<And>s f t. \<lbrakk>\<forall>x\<in>s. f x = (0::?'b4); finite s; finite t\<rbrakk> \<Longrightarrow> sum f (s \<union> t) = sum f t; finite (two_chain_horizontal_boundary two_chain); (\<Sum>x\<in>\<H>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)\<rbrakk> \<Longrightarrow> (\<Sum>x\<in>\<H> \<union> \<V>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)
[PROOF STEP]
by (smt Un_commute sum_zero_set)
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>\<gamma>. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g) = (\<Sum>x\<in>two_chain_horizontal_boundary two_chain. case x of (k, g) \<Rightarrow> real_of_int k * line_integral F {i} g)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
[PROOF STEP]
have "one_chain_line_integral F {i} \<gamma> =
             one_chain_line_integral F {i} (two_chain_boundary two_chain)"
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_boundary two_chain)
[PROOF STEP]
using x_axis_line_integral_is_only_horizontal line_integral_on_path
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
one_chain_line_integral F {i} (two_chain_boundary two_chain) = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_horizontal_boundary two_chain)

goal (1 subgoal):
 1. one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_boundary two_chain)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_boundary two_chain)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
using assms GreenThm_typeI_divisible
[PROOF STATE]
proof (prove)
using this:
one_chain_line_integral F {i} \<gamma> = one_chain_line_integral F {i} (two_chain_boundary two_chain)
valid_typeI_division s two_chain
\<forall>twoC\<in>two_chain. analytically_valid (cubeImage twoC) (\<lambda>a. F a \<bullet> i) j
only_vertical_division \<gamma> two_chain
gen_division s (cubeImage ` two_chain) \<Longrightarrow> integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} (two_chain_boundary two_chain)

goal (1 subgoal):
 1. integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
integral s (\<lambda>x. - partial_vector_derivative (\<lambda>a. F a \<bullet> i) j x) = one_chain_line_integral F {i} \<gamma>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma word_le_sub1: "x \<noteq> 0 \<Longrightarrow> 1 \<le> x \<longleftrightarrow> 0 \<le> x - 1"
  for x :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> 0 \<Longrightarrow> (1 \<le> x) = (0 \<le> x - 1)
[PROOF STEP]
by transfer (simp add: int_one_le_iff_zero_less less_le)


[STATEMENT]
lemma maddux_3_11_pp:
  "(x \<sqinter> -y) \<squnion> (x \<sqinter> --y) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqinter> - y \<squnion> x \<sqinter> - - y = x
[PROOF STEP]
by (metis inf_sup_distrib1 inf_top_right stone)


[STATEMENT]
lemma sets_distinct5: "(n::int) < m \<Longrightarrow> {(a,b). a = n} \<noteq> {(a,b). a = m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < m \<Longrightarrow> {(a, b). a = n} \<noteq> {(a, b). a = m}
[PROOF STEP]
by auto


[STATEMENT]
lemma size_abort_isSng: "op_set_isSng s \<longleftrightarrow> op_set_size_abort 2 s = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_set_isSng s = (op_set_size_abort 2 s = 1)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in is_cat_obj_coprod) cat_obj_coprod_unique:
  assumes "\<pi>' : A >\<^sub>C\<^sub>F\<^sub>.\<^sub>\<Coprod> U' : I \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<exists>!f'. f' : U \<mapsto>\<^bsub>\<CC>\<^esub> U' \<and> \<pi>' = ntcf_const (:\<^sub>C I) \<CC> f' \<bullet>\<^sub>N\<^sub>T\<^sub>C\<^sub>F \<pi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!f'. f' : U \<mapsto>\<^bsub>\<CC>\<^esub> U' \<and> \<pi>' = ntcf_const (:\<^sub>C I) \<CC> f' \<bullet>\<^sub>N\<^sub>T\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<pi>
[PROOF STEP]
by (intro cat_colim_unique[OF is_cat_obj_coprodD(1)[OF assms]])


[STATEMENT]
lemma mat_max_carrier[simp]:
  "max\<^sub>m A B \<in> carrier_mat (dim_row A) (dim_col A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max\<^sub>m A B \<in> carrier_mat (dim_row A) (dim_col A)
[PROOF STEP]
unfolding mat_max_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat (dim_row A) (dim_col A) (\<lambda>ij. max (A $$ ij) (B $$ ij)) \<in> carrier_mat (dim_row A) (dim_col A)
[PROOF STEP]
by auto


[STATEMENT]
lemma ODNmap_mem1:" \<lbrakk>Worder D; y \<in> segment ODnods (ordinal_number D)\<rbrakk>
         \<Longrightarrow> ODNmap D y \<in> carrier D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Worder D; y \<in> segment ODnods (ordinal_number D)\<rbrakk> \<Longrightarrow> ODNmap D y \<in> carrier D
[PROOF STEP]
apply (frule_tac D = D and x = "ordinal_number D" and y = y in ODNmap_mem,
       simp,
       frule ordinal_number_mem_carrier_ODnods[of "D"],
       simp add:ODnods_def segment_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Worder D; y \<in> segment ODnods (ordinal_number D)\<rbrakk> \<Longrightarrow> y \<sqsubset> ordinal_number D
 2. \<lbrakk>Worder D; y \<in> segment ODnods (ordinal_number D); ODNmap D y \<in> carrier D \<and> (\<forall>Y\<in>y. ord_equiv Y (Iod D (segment D (ODNmap D y))))\<rbrakk> \<Longrightarrow> ODNmap D y \<in> carrier D
[PROOF STEP]
apply (simp add:segment_def,
        frule ordinal_number_mem_carrier_ODnods[of "D"], simp,
        erule conjE, simp add:ODnods_def oless_def ole_def ODrel_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Worder D; ordinal_number D \<in> ODnums; y \<in> ODnums \<and> y \<sqsubseteq> ordinal_number D \<and> y \<noteq> ordinal_number D\<rbrakk> \<Longrightarrow> y \<sqsubset> ordinal_number D
 2. \<lbrakk>Worder D; y \<in> segment ODnods (ordinal_number D); ODNmap D y \<in> carrier D \<and> (\<forall>Y\<in>y. ord_equiv Y (Iod D (segment D (ODNmap D y))))\<rbrakk> \<Longrightarrow> ODNmap D y \<in> carrier D
[PROOF STEP]
apply (simp add:ODord_le_def, blast, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma summable_suminf_not_top: "(\<And>i. 0 \<le> f i) \<Longrightarrow> (\<Sum>i. ennreal (f i)) \<noteq> top \<Longrightarrow> summable f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>i. 0 \<le> f i; (\<Sum>i. ennreal (f i)) \<noteq> top\<rbrakk> \<Longrightarrow> summable f
[PROOF STEP]
using summable_sums[OF summableI, of "\<lambda>i. ennreal (f i)"]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i. ennreal (f i)) sums (\<Sum>i. ennreal (f i))

goal (1 subgoal):
 1. \<lbrakk>\<And>i. 0 \<le> f i; (\<Sum>i. ennreal (f i)) \<noteq> top\<rbrakk> \<Longrightarrow> summable f
[PROOF STEP]
by (cases "\<Sum>i. ennreal (f i)" rule: ennreal_cases)
     (auto simp: summable_def)


[STATEMENT]
lemma nonces_MPair [simp]:
  shows "nonces (MPair X Y) = nonces X \<union> nonces Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nonces (MPair X Y) = nonces X \<union> nonces Y
[PROOF STEP]
by (lifting freenonces.simps(2))


[STATEMENT]
lemma coeff_poly_of_vec:
  "coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else 0)"
  (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
have "?l = (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else 0)" (is "_ = ?m")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a))
[PROOF STEP]
unfolding poly_of_vec_def Let_def coeff_sum coeff_monom
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
coeff (poly_of_vec v) i = (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a))

goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
coeff (poly_of_vec v) i = (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a))

goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
have "\<dots> = ?r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
proof (cases "i < dim_vec v")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
 2. \<not> i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> i < dim_vec v

goal (2 subgoals):
 1. i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
 2. \<not> i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
by (subst sum.neutral, insert False, auto)
[PROOF STATE]
proof (state)
this:
(\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))

goal (1 subgoal):
 1. i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i < dim_vec v

goal (1 subgoal):
 1. i < dim_vec v \<Longrightarrow> (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
by (subst sum.remove[of _ i], force, force simp: True, subst sum.neutral, insert True, auto)
[PROOF STATE]
proof (state)
this:
(\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>x<dim_vec v. if x = i then v $ (dim_vec v - Suc x) else (0::'a)) = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))

goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))

goal (1 subgoal):
 1. coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
coeff (poly_of_vec v) i = (if i < dim_vec v then v $ (dim_vec v - Suc i) else (0::'a))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem leadsTo_Join:
  assumes leadsTo: "F \<in> A leadsTo B"
      and awpF: "T-B \<subseteq> awp F T"
      and awpG: "!!X. X \<in> wens_set F B ==> (T\<inter>X) - B \<subseteq> awp G (T\<inter>X)"
  shows "F\<squnion>G \<in> T\<inter>A leadsTo B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F \<squnion> G \<in> T \<inter> A \<longmapsto> B
[PROOF STEP]
apply (rule leadsTo [THEN leadsTo_imp_wens_set, THEN bexE])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x\<rbrakk> \<Longrightarrow> F \<squnion> G \<in> T \<inter> A \<longmapsto> B
[PROOF STEP]
apply (rule wens_Union [THEN bexE])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x\<rbrakk> \<Longrightarrow> ?T4 x - ?B4 x \<subseteq> awp (?F4 x) (?T4 x)
 2. \<And>x X. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x; X \<in> wens_set (?F4 x) (?B4 x)\<rbrakk> \<Longrightarrow> ?T4 x \<inter> X - ?B4 x \<subseteq> awp (?G4 x) (?T4 x \<inter> X)
 3. \<And>x. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x\<rbrakk> \<Longrightarrow> ?X4 x \<in> wens_set (?F4 x) (?B4 x)
 4. \<And>x xa. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x; xa \<in> wens_set (?F4 x \<squnion> ?G4 x) (?B4 x); xa \<subseteq> ?X4 x \<and> ?T4 x \<inter> ?X4 x = ?T4 x \<inter> xa\<rbrakk> \<Longrightarrow> F \<squnion> G \<in> T \<inter> A \<longmapsto> B
[PROOF STEP]
apply (rule awpF)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x X. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x; X \<in> wens_set F B\<rbrakk> \<Longrightarrow> T \<inter> X - B \<subseteq> awp (?G4 x) (T \<inter> X)
 2. \<And>x. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x\<rbrakk> \<Longrightarrow> ?X4 x \<in> wens_set F B
 3. \<And>x xa. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x; xa \<in> wens_set (F \<squnion> ?G4 x) B; xa \<subseteq> ?X4 x \<and> T \<inter> ?X4 x = T \<inter> xa\<rbrakk> \<Longrightarrow> F \<squnion> G \<in> T \<inter> A \<longmapsto> B
[PROOF STEP]
apply (erule awpG, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<in> wens_set F B; A \<subseteq> x; xa \<in> wens_set (F \<squnion> G) B; xa \<subseteq> x \<and> T \<inter> x = T \<inter> xa\<rbrakk> \<Longrightarrow> F \<squnion> G \<in> T \<inter> A \<longmapsto> B
[PROOF STEP]
apply (blast intro: wens_set_imp_leadsTo [THEN leadsTo_weaken_L])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma wtSB_o:
assumes 1: "wtSB \<pi>1" and 2: "wtSB \<pi>2"
shows "wtSB (subst \<pi>1 o \<pi>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wtSB (subst \<pi>1 \<circ> \<pi>2)
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
wtSB \<pi>2

goal (1 subgoal):
 1. wtSB (subst \<pi>1 \<circ> \<pi>2)
[PROOF STEP]
unfolding wtSB_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x. wt (\<pi>2 x) \<and> tpOf (\<pi>2 x) = tpOfV x

goal (1 subgoal):
 1. \<forall>x. wt ((subst \<pi>1 \<circ> \<pi>2) x) \<and> tpOf ((subst \<pi>1 \<circ> \<pi>2) x) = tpOfV x
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
\<forall>x. wt (\<pi>2 x) \<and> tpOf (\<pi>2 x) = tpOfV x
wtSB \<pi>1

goal (1 subgoal):
 1. \<forall>x. wt ((subst \<pi>1 \<circ> \<pi>2) x) \<and> tpOf ((subst \<pi>1 \<circ> \<pi>2) x) = tpOfV x
[PROOF STEP]
by auto


[STATEMENT]
lemma integral_mult_right[simp]:
  fixes c :: "_::{real_normed_algebra,second_countable_topology}"
  shows "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. c * f x \<partial>M) = c * integral\<^sup>L M f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<noteq> (0::'b) \<Longrightarrow> integrable M f) \<Longrightarrow> LINT x|M. c * f x = c * integral\<^sup>L M f
[PROOF STEP]
by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_mult_right)


[STATEMENT]
lemma all_coplanar:
  "Coplanar A B C D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
have "\<forall> A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q\<longrightarrow> Cong C P C Q \<longrightarrow>
(Bet A B C \<or> Bet B C A \<or> Bet C A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q \<longrightarrow> Cong C P C Q \<longrightarrow> Bet A B C \<or> Bet B C A \<or> Bet C A B
[PROOF STEP]
using upper_dim
[PROOF STATE]
proof (prove)
using this:
\<forall>a b c p q. p \<noteq> q \<and> Cong a p a q \<and> Cong b p b q \<and> Cong c p c q \<longrightarrow> Bet a b c \<or> Bet b c a \<or> Bet c a b

goal (1 subgoal):
 1. \<forall>A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q \<longrightarrow> Cong C P C Q \<longrightarrow> Bet A B C \<or> Bet B C A \<or> Bet C A B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q \<longrightarrow> Cong C P C Q \<longrightarrow> Bet A B C \<or> Bet B C A \<or> Bet C A B

goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q \<longrightarrow> Cong C P C Q \<longrightarrow> Bet A B C \<or> Bet B C A \<or> Bet C A B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q \<longrightarrow> Cong C P C Q \<longrightarrow> Bet A B C \<or> Bet B C A \<or> Bet C A B

goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
using upper_dim_implies_all_coplanar
[PROOF STATE]
proof (prove)
using this:
\<forall>A B C P Q. P \<noteq> Q \<longrightarrow> Cong A P A Q \<longrightarrow> Cong B P B Q \<longrightarrow> Cong C P C Q \<longrightarrow> Bet A B C \<or> Bet B C A \<or> Bet C A B
UpperDimAxiom \<Longrightarrow> AllCoplanarAxiom

goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
by (smt Tarski_neutral_dimensionless.not_col_permutation_2 Tarski_neutral_dimensionless_axioms all_coplanar_axiom_def all_coplanar_implies_upper_dim coplanar_perm_9 ncop__ncol os__coplanar ts__coplanar upper_dim_implies_not_one_side_two_sides)
[PROOF STATE]
proof (state)
this:
Coplanar A B C D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma param_rbt_insert[param]:
    fixes less
    assumes param_less[param]: "(less,less') \<in> Ra \<rightarrow> Ra \<rightarrow> Id"
    shows "(ord.rbt_insert less,ord.rbt_insert less') \<in>
      Ra \<rightarrow> Rb \<rightarrow> \<langle>Ra,Rb\<rangle>rbt_rel \<rightarrow> \<langle>Ra,Rb\<rangle>rbt_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ord.rbt_insert less, ord.rbt_insert less') \<in> Ra \<rightarrow> Rb \<rightarrow> \<langle>Ra, Rb\<rangle>rbt_rel \<rightarrow> \<langle>Ra, Rb\<rangle>rbt_rel
[PROOF STEP]
unfolding rbt_insert_def ord.rbt_insert_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ord.rbt_insert_with_key less (\<lambda>_ _ nv. nv), ord.rbt_insert_with_key less' (\<lambda>_ _ nv. nv)) \<in> Ra \<rightarrow> Rb \<rightarrow> \<langle>Ra, Rb\<rangle>rbt_rel \<rightarrow> \<langle>Ra, Rb\<rangle>rbt_rel
[PROOF STEP]
unfolding rbt_insert_with_key_def[abs_def]
      ord.rbt_insert_with_key_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k v t. paint color.B (ord.rbt_ins less (\<lambda>_ _ nv. nv) k v t), \<lambda>k v t. paint color.B (ord.rbt_ins less' (\<lambda>_ _ nv. nv) k v t)) \<in> Ra \<rightarrow> Rb \<rightarrow> \<langle>Ra, Rb\<rangle>rbt_rel \<rightarrow> \<langle>Ra, Rb\<rangle>rbt_rel
[PROOF STEP]
by parametricity


[STATEMENT]
theorem While_WbisT[simp]:
assumes "compatTst tst" and "c \<approx>wT d"
shows "While tst c \<approx>wT While tst d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. while tst do c \<approx>wT while tst do d
[PROOF STEP]
using assms thetaWhileW_WbisT
[PROOF STATE]
proof (prove)
using this:
compatTst tst
c \<approx>wT d
thetaWhileW \<subseteq> WbisT

goal (1 subgoal):
 1. while tst do c \<approx>wT while tst do d
[PROOF STEP]
unfolding thetaWhileW_def
[PROOF STATE]
proof (prove)
using this:
compatTst tst
c \<approx>wT d
{(while tst do c, while tst do d) |tst c d. compatTst tst \<and> c \<approx>wT d} \<union> {(c1 ;; while tst do c, d1 ;; while tst do d) |tst c1 d1 c d. compatTst tst \<and> c1 \<approx>wT d1 \<and> c \<approx>wT d} \<subseteq> WbisT

goal (1 subgoal):
 1. while tst do c \<approx>wT while tst do d
[PROOF STEP]
by auto


[STATEMENT]
lemma (in PolynRg) erH_rHom_coeff:"\<lbrakk>Idomain S; PolynRg A B Y; h \<in> rHom S B;
       pol_coeff S (n, f)\<rbrakk>  \<Longrightarrow> pol_coeff B (n, cmp h f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Idomain S; PolynRg A B Y; h \<in> rHom S B; pol_coeff S (n, f)\<rbrakk> \<Longrightarrow> pol_coeff B (n, cmp h f)
[PROOF STEP]
apply (simp add:pol_coeff_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Idomain S; PolynRg A B Y; h \<in> rHom S B; \<forall>j\<le>n. f j \<in> carrier S\<rbrakk> \<Longrightarrow> \<forall>j\<le>n. cmp h f j \<in> carrier B
[PROOF STEP]
apply (rule allI, rule impI, drule_tac a = j in forall_spec, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>j. \<lbrakk>Idomain S; PolynRg A B Y; h \<in> rHom S B; j \<le> n; f j \<in> carrier S\<rbrakk> \<Longrightarrow> cmp h f j \<in> carrier B
[PROOF STEP]
apply (simp add:cmp_def rHom_mem)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma between_trans:
    fixes a :: "'a :: euclidean_space"
    shows "\<lbrakk>between (b,c) a; between (a,c) d\<rbrakk> \<Longrightarrow> between (b,c) d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>between (b, c) a; between (a, c) d\<rbrakk> \<Longrightarrow> between (b, c) d
[PROOF STEP]
using dist_triangle2 [of b c d] dist_triangle3 [of b d a]
[PROOF STATE]
proof (prove)
using this:
dist b c \<le> dist b d + dist c d
dist b d \<le> dist a b + dist a d

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


[STATEMENT]
lemma less_ucast_ucast_less:
  "LENGTH('b) \<le> LENGTH('a) \<Longrightarrow> x < ucast y \<Longrightarrow> ucast x < y"
  for x :: "'a::len word" and y :: "'b::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>LENGTH('b) \<le> LENGTH('a); x < ucast y\<rbrakk> \<Longrightarrow> ucast x < y
[PROOF STEP]
by (metis ucast_nat_def unat_mono unat_ucast_up_simp word_of_nat_less)


[STATEMENT]
lemma finite_path_iff:
  "finite_path x \<longleftrightarrow> backward_finite_path x \<and> forward_finite_path x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_path x = (backward_finite_path x \<and> forward_finite_path x)
[PROOF STEP]
using finite_iff
[PROOF STATE]
proof (prove)
using this:
relation_algebra_rtc_class.finite ?x = (backward_finite ?x \<and> forward_finite ?x)

goal (1 subgoal):
 1. finite_path x = (backward_finite_path x \<and> forward_finite_path x)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma bigo_abs5: "f =o O(g) \<Longrightarrow> (\<lambda>x. \<bar>f x\<bar>) =o O(g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> O(g) \<Longrightarrow> (\<lambda>x. \<bar>f x\<bar>) \<in> O(g)
[PROOF STEP]
by (auto simp: bigo_def)


[STATEMENT]
theorem completeness:
assumes "U.SAT \<Phi>"  shows "M.SAT \<Phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M.SAT \<Phi>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
U.SAT \<Phi>

goal (1 subgoal):
 1. M.SAT \<Phi>
[PROOF STEP]
unfolding M.SAT_def satPB_e U.SAT_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<xi>. U.wtE \<xi> \<longrightarrow> M.satPB \<xi> \<Phi>

goal (1 subgoal):
 1. \<forall>\<xi>. M.wtE \<xi> \<longrightarrow> M.satPB \<xi> \<Phi>
[PROOF STEP]
by auto


[STATEMENT]
lemma adhoc_norm_triangle: "a + norm(y) \<le> b ==> norm(x) \<le> a ==> norm(x + y) \<le> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a + norm y \<le> b; norm x \<le> a\<rbrakk> \<Longrightarrow> norm (x + y) \<le> b
[PROOF STEP]
by (metis norm_triangle_mono order.trans order_refl)


[STATEMENT]
lemma nsets_one: "nsets A (Suc 0) = (\<lambda>x. {x}) ` A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [A]\<^bsup>Suc 0\<^esup> = (\<lambda>x. {x}) ` A
[PROOF STEP]
using card_eq_SucD
[PROOF STATE]
proof (prove)
using this:
card ?A = Suc ?k \<Longrightarrow> \<exists>b B. ?A = insert b B \<and> b \<notin> B \<and> card B = ?k \<and> (?k = 0 \<longrightarrow> B = {})

goal (1 subgoal):
 1. [A]\<^bsup>Suc 0\<^esup> = (\<lambda>x. {x}) ` A
[PROOF STEP]
by (force simp: nsets_def)