[STATEMENT]
lemma reward_until_simps[simp]:
  shows "s \<in> X \<Longrightarrow> reward_until X s \<omega> = 0"
    and "s \<notin> X \<Longrightarrow> reward_until X s \<omega> = \<rho> s + \<iota> s (shd \<omega>) + reward_until X (shd \<omega>) (stl \<omega>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s \<in> X \<Longrightarrow> reward_until X s \<omega> = 0) &&& (s \<notin> X \<Longrightarrow> reward_until X s \<omega> = \<rho> s + \<iota> s (shd \<omega>) + reward_until X (shd \<omega>) (stl \<omega>))
[PROOF STEP]
unfolding reward_until_unfold[of X s \<omega>]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s \<in> X \<Longrightarrow> (if s \<in> X then 0 else \<rho> s + \<iota> s (shd \<omega>) + reward_until X (shd \<omega>) (stl \<omega>)) = 0) &&& (s \<notin> X \<Longrightarrow> (if s \<in> X then 0 else \<rho> s + \<iota> s (shd \<omega>) + reward_until X (shd \<omega>) (stl \<omega>)) = \<rho> s + \<iota> s (shd \<omega>) + reward_until X (shd \<omega>) (stl \<omega>))
[PROOF STEP]
by simp_all


[STATEMENT]
lemma verts_nempty: "verts G \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. verts G \<noteq> {}
[PROOF STEP]
using connected connected_iff_reachable
[PROOF STATE]
proof (prove)
using this:
Digraph_Component.connected G
Digraph_Component.connected G = ((\<forall>x\<in>verts G. \<forall>y\<in>verts G. x \<rightarrow>\<^sup>*\<^bsub>G\<^esub> y) \<and> verts G \<noteq> {})

goal (1 subgoal):
 1. verts G \<noteq> {}
[PROOF STEP]
by auto


[STATEMENT]
lemma eliminate_entries_gen_transfer: assumes *[transfer_rule]: "(R ===> R ===> R) ad ad'"
  "(R ===> R ===> R) mul mul'"
  and vs: "\<And> j. j < dim_row B' \<Longrightarrow> R (vs j) (vs' j)"
  and i: "i < dim_row B'"
  and B: "mat_rel R B B'"
  shows "mat_rel R
   (eliminate_entries_gen ad mul vs B i j)
   (eliminate_entries_gen ad' mul' vs' B' i j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_rel R (eliminate_entries_gen ad mul vs B i j) (eliminate_entries_gen ad' mul' vs' B' i j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_rel R (eliminate_entries_gen ad mul vs B i j) (eliminate_entries_gen ad' mul' vs' B' i j)
[PROOF STEP]
note BB = B[unfolded mat_rel_def]
[PROOF STATE]
proof (state)
this:
dim_row B = dim_row B' \<and> dim_col B = dim_col B' \<and> (\<forall>i j. i < dim_row B' \<longrightarrow> j < dim_col B' \<longrightarrow> R (B $$ (i, j)) (B' $$ (i, j)))

goal (1 subgoal):
 1. mat_rel R (eliminate_entries_gen ad mul vs B i j) (eliminate_entries_gen ad' mul' vs' B' i j)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_rel R (eliminate_entries_gen ad mul vs B i j) (eliminate_entries_gen ad' mul' vs' B' i j)
[PROOF STEP]
unfolding mat_rel_def dim_eliminate_entries_gen
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row B = dim_row B' \<and> dim_col B = dim_col B' \<and> (\<forall>ia ja. ia < dim_row B' \<longrightarrow> ja < dim_col B' \<longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja)))
[PROOF STEP]
proof (intro conjI impI allI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
fix i' j'
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
assume ij': "i' < dim_row B'" "j' < dim_col B'"
[PROOF STATE]
proof (state)
this:
i' < dim_row B'
j' < dim_col B'

goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
with BB
[PROOF STATE]
proof (chain)
picking this:
dim_row B = dim_row B' \<and> dim_col B = dim_col B' \<and> (\<forall>i j. i < dim_row B' \<longrightarrow> j < dim_col B' \<longrightarrow> R (B $$ (i, j)) (B' $$ (i, j)))
i' < dim_row B'
j' < dim_col B'
[PROOF STEP]
have ij: "i'< dim_row B" "j' < dim_col B"
[PROOF STATE]
proof (prove)
using this:
dim_row B = dim_row B' \<and> dim_col B = dim_col B' \<and> (\<forall>i j. i < dim_row B' \<longrightarrow> j < dim_col B' \<longrightarrow> R (B $$ (i, j)) (B' $$ (i, j)))
i' < dim_row B'
j' < dim_col B'

goal (1 subgoal):
 1. i' < dim_row B &&& j' < dim_col B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i' < dim_row B
j' < dim_col B

goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
have [transfer_rule]: "R (B $$ (i', j')) (B' $$ (i', j'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R (B $$ (i', j')) (B' $$ (i', j'))
[PROOF STEP]
using BB ij'
[PROOF STATE]
proof (prove)
using this:
dim_row B = dim_row B' \<and> dim_col B = dim_col B' \<and> (\<forall>i j. i < dim_row B' \<longrightarrow> j < dim_col B' \<longrightarrow> R (B $$ (i, j)) (B' $$ (i, j)))
i' < dim_row B'
j' < dim_col B'

goal (1 subgoal):
 1. R (B $$ (i', j')) (B' $$ (i', j'))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
R (B $$ (i', j')) (B' $$ (i', j'))

goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
have [transfer_rule]: "R (B $$ (i, j')) (B' $$ (i, j'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R (B $$ (i, j')) (B' $$ (i, j'))
[PROOF STEP]
using BB ij' i
[PROOF STATE]
proof (prove)
using this:
dim_row B = dim_row B' \<and> dim_col B = dim_col B' \<and> (\<forall>i j. i < dim_row B' \<longrightarrow> j < dim_col B' \<longrightarrow> R (B $$ (i, j)) (B' $$ (i, j)))
i' < dim_row B'
j' < dim_col B'
i < dim_row B'

goal (1 subgoal):
 1. R (B $$ (i, j')) (B' $$ (i, j'))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
R (B $$ (i, j')) (B' $$ (i, j'))

goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
have [transfer_rule]: "R (vs i') (vs' i')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R (vs i') (vs' i')
[PROOF STEP]
using ij' vs[of i']
[PROOF STATE]
proof (prove)
using this:
i' < dim_row B'
j' < dim_col B'
i' < dim_row B' \<Longrightarrow> R (vs i') (vs' i')

goal (1 subgoal):
 1. R (vs i') (vs' i')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
R (vs i') (vs' i')

goal (3 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
 3. \<And>ia ja. \<lbrakk>ia < dim_row B'; ja < dim_col B'\<rbrakk> \<Longrightarrow> R (eliminate_entries_gen ad mul vs B i j $$ (ia, ja)) (eliminate_entries_gen ad' mul' vs' B' i j $$ (ia, ja))
[PROOF STEP]
show "R (eliminate_entries_gen ad mul vs B i j $$ (i', j'))
        (eliminate_entries_gen ad' mul' vs' B' i j $$ (i', j'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R (eliminate_entries_gen ad mul vs B i j $$ (i', j')) (eliminate_entries_gen ad' mul' vs' B' i j $$ (i', j'))
[PROOF STEP]
unfolding eliminate_entries_gen_def index_mat(1)[OF ij] index_mat(1)[OF ij'] split
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R (if i' \<noteq> i then ad (B $$ (i', j')) (mul (vs i') (B $$ (i, j'))) else B $$ (i', j')) (if i' \<noteq> i then ad' (B' $$ (i', j')) (mul' (vs' i') (B' $$ (i, j'))) else B' $$ (i', j'))
[PROOF STEP]
by transfer_prover
[PROOF STATE]
proof (state)
this:
R (eliminate_entries_gen ad mul vs B i j $$ (i', j')) (eliminate_entries_gen ad' mul' vs' B' i j $$ (i', j'))

goal (2 subgoals):
 1. dim_row B = dim_row B'
 2. dim_col B = dim_col B'
[PROOF STEP]
qed (insert BB, auto)
[PROOF STATE]
proof (state)
this:
mat_rel R (eliminate_entries_gen ad mul vs B i j) (eliminate_entries_gen ad' mul' vs' B' i j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma degree_map_poly_Const: "degree (map_poly (Const :: 'a :: semiring_0 \<Rightarrow> _) f) = degree f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Polynomial.degree (map_poly Const f) = Polynomial.degree f
[PROOF STEP]
by (rule degree_map_poly, auto)


[STATEMENT]
lemma le_floor_iff: "z \<le> \<lfloor>x\<rfloor> \<longleftrightarrow> of_int z \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (z \<le> \<lfloor>x\<rfloor>) = (of_int z \<le> x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
assume "z \<le> \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (state)
this:
z \<le> \<lfloor>x\<rfloor>

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
have "(of_int z :: 'a) \<le> of_int \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
z \<le> \<lfloor>x\<rfloor>

goal (1 subgoal):
 1. of_int z \<le> of_int \<lfloor>x\<rfloor>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int \<lfloor>x\<rfloor>

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int \<lfloor>x\<rfloor>

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
have "of_int \<lfloor>x\<rfloor> \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int \<lfloor>x\<rfloor> \<le> x
[PROOF STEP]
by (rule of_int_floor_le)
[PROOF STATE]
proof (state)
this:
of_int \<lfloor>x\<rfloor> \<le> x

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
of_int z \<le> x
[PROOF STEP]
show "of_int z \<le> x"
[PROOF STATE]
proof (prove)
using this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
assume "of_int z \<le> x"
[PROOF STATE]
proof (state)
this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
have "x < of_int (\<lfloor>x\<rfloor> + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < of_int (\<lfloor>x\<rfloor> + 1)
[PROOF STEP]
using floor_correct
[PROOF STATE]
proof (prove)
using this:
of_int \<lfloor>?x\<rfloor> \<le> ?x \<and> ?x < of_int (\<lfloor>?x\<rfloor> + 1)

goal (1 subgoal):
 1. x < of_int (\<lfloor>x\<rfloor> + 1)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
x < of_int (\<lfloor>x\<rfloor> + 1)

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
of_int z < of_int (\<lfloor>x\<rfloor> + 1)
[PROOF STEP]
show "z \<le> \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
of_int z < of_int (\<lfloor>x\<rfloor> + 1)

goal (1 subgoal):
 1. z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
by (simp del: of_int_add)
[PROOF STATE]
proof (state)
this:
z \<le> \<lfloor>x\<rfloor>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closure_halfspace_component_lt [simp]:
     "closure {x. x$k < a} = {x :: (real^'n). x$k \<le> a}" (is "?LE")
  and closure_halfspace_component_gt [simp]:
     "closure {x. x$k > a} = {x :: (real^'n). x$k \<ge> a}" (is "?GE")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a} &&& closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a}
 2. closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
have "axis k (1::real) \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. axis k 1 \<noteq> 0
[PROOF STEP]
by (simp add: axis_def vec_eq_iff)
[PROOF STATE]
proof (state)
this:
axis k 1 \<noteq> 0

goal (2 subgoals):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a}
 2. closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
axis k 1 \<noteq> 0

goal (2 subgoals):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a}
 2. closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
have "axis k (1::real) \<bullet> x = x$k" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. axis k 1 \<bullet> x = x $ k
[PROOF STEP]
by (simp add: cart_eq_inner_axis inner_commute)
[PROOF STATE]
proof (state)
this:
axis k 1 \<bullet> ?x = ?x $ k

goal (2 subgoals):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a}
 2. closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
axis k 1 \<noteq> 0
axis k 1 \<bullet> ?x = ?x $ k
[PROOF STEP]
show ?LE ?GE
[PROOF STATE]
proof (prove)
using this:
axis k 1 \<noteq> 0
axis k 1 \<bullet> ?x = ?x $ k

goal (1 subgoal):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a} &&& closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
using closure_halfspace_lt [of "axis k (1::real)" a]
          closure_halfspace_gt [of "axis k (1::real)" a]
[PROOF STATE]
proof (prove)
using this:
axis k 1 \<noteq> 0
axis k 1 \<bullet> ?x = ?x $ k
axis k 1 \<noteq> 0 \<Longrightarrow> closure {x. axis k 1 \<bullet> x < a} = {x. axis k 1 \<bullet> x \<le> a}
axis k 1 \<noteq> 0 \<Longrightarrow> closure {x. a < axis k 1 \<bullet> x} = {x. a \<le> axis k 1 \<bullet> x}

goal (1 subgoal):
 1. closure {x. x $ k < a} = {x. x $ k \<le> a} &&& closure {x. a < x $ k} = {x. a \<le> x $ k}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
closure {x. x $ k < a} = {x. x $ k \<le> a}
closure {x. a < x $ k} = {x. a \<le> x $ k}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dual_is_ordered_inc_sys: "ordered_incidence_system [0..<length \<B>s] \<B>s*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordered_incidence_system [0..<length \<B>s] \<B>s*
[PROOF STEP]
using inc_sys_orderedI dual_blocks_ordered_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>incidence_system ?V ?B; distinct ?Vs; set ?Vs = ?V; mset ?Bs = ?B\<rbrakk> \<Longrightarrow> ordered_incidence_system ?Vs ?Bs
dual_blocks \<V> \<B>s = mset \<B>s*

goal (1 subgoal):
 1. ordered_incidence_system [0..<length \<B>s] \<B>s*
[PROOF STEP]
by (metis atLeastLessThan_upt distinct_upt dual_sys.incidence_system_axioms)


[STATEMENT]
lemma matrix_to_iarray_show_matrix_real[code_unfold]: "matrix_to_iarray (show_matrix_real v)
  = show_matrix_real_iarrays (matrix_to_iarray v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray (show_matrix_real v) = show_matrix_real_iarrays (matrix_to_iarray v)
[PROOF STEP]
unfolding show_matrix_real_iarrays_def show_matrix_real_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray (\<chi>i. show_vec_real (v $ i)) = IArray.of_fun (\<lambda>i. show_vec_real_iarrays (matrix_to_iarray v !! i)) (IArray.length (matrix_to_iarray v))
[PROOF STEP]
unfolding matrix_to_iarray_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray (map (vec_to_iarray \<circ> ($) (\<chi>i. show_vec_real (v $ i)) \<circ> mod_type_class.from_nat) [0..<CARD('b)]) = IArray.of_fun (\<lambda>i. show_vec_real_iarrays (IArray (map (vec_to_iarray \<circ> ($) v \<circ> mod_type_class.from_nat) [0..<CARD('b)]) !! i)) (IArray.length (IArray (map (vec_to_iarray \<circ> ($) v \<circ> mod_type_class.from_nat) [0..<CARD('b)])))
[PROOF STEP]
by (simp add: vec_to_iarray_show_vec_real)


[STATEMENT]
lemma consumption_set_member: "\<forall>x. x \<in> consumption_set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. x \<in> consumption_set
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>x. x \<in> consumption_set
[PROOF STEP]
have "\<And>(x::'a). x \<in> consumption_set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> consumption_set
[PROOF STEP]
using cons_set_props pre_arrow_debreu_consumption_set_def
[PROOF STATE]
proof (prove)
using this:
pre_arrow_debreu_consumption_set consumption_set
pre_arrow_debreu_consumption_set ?consumption_set \<equiv> \<forall>x. x \<in> UNIV \<longrightarrow> x \<in> ?consumption_set

goal (1 subgoal):
 1. \<And>x. x \<in> consumption_set
[PROOF STEP]
by (simp add: pre_arrow_debreu_consumption_set_def)
[PROOF STATE]
proof (state)
this:
?x1 \<in> consumption_set

goal (1 subgoal):
 1. \<forall>x. x \<in> consumption_set
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
?x1 \<in> consumption_set

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma VectorSpaceHomSetI :
  "VectorSpaceHom fsmult V fsmult' T \<Longrightarrow> T ` V \<subseteq> W
        \<Longrightarrow> T \<in> VectorSpaceHomSet fsmult V fsmult' W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>VectorSpaceHom fsmult V fsmult' T; T ` V \<subseteq> W\<rbrakk> \<Longrightarrow> T \<in> VectorSpaceHomSet fsmult V fsmult' W
[PROOF STEP]
unfolding VectorSpaceHomSet_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>VectorSpaceHom fsmult V fsmult' T; T ` V \<subseteq> W\<rbrakk> \<Longrightarrow> T \<in> {T. VectorSpaceHom fsmult V fsmult' T} \<inter> {T. T ` V \<subseteq> W}
[PROOF STEP]
by fast


[STATEMENT]
lemma subseteq_mset_size_eql: "X \<subseteq># Y \<Longrightarrow> size Y = size X \<Longrightarrow> X = Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<subseteq># Y; size Y = size X\<rbrakk> \<Longrightarrow> X = Y
[PROOF STEP]
using mset_subset_size subset_mset_def
[PROOF STATE]
proof (prove)
using this:
?A \<subset># ?B \<Longrightarrow> size ?A < size ?B
(?A \<subset># ?B) = (?A \<subseteq># ?B \<and> ?A \<noteq> ?B)

goal (1 subgoal):
 1. \<lbrakk>X \<subseteq># Y; size Y = size X\<rbrakk> \<Longrightarrow> X = Y
[PROOF STEP]
by fastforce


[STATEMENT]
lemma rel_interior_eq:
   "rel_interior s = s \<longleftrightarrow> openin(top_of_set (affine hull s)) s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rel_interior s = s) = openin (top_of_set (affine hull s)) s
[PROOF STEP]
using rel_open rel_open_def
[PROOF STATE]
proof (prove)
using this:
rel_open ?S = openin (top_of_set (affine hull ?S)) ?S
rel_open ?S = (rel_interior ?S = ?S)

goal (1 subgoal):
 1. (rel_interior s = s) = openin (top_of_set (affine hull s)) s
[PROOF STEP]
by blast


[STATEMENT]
lemma subgraph_induce_subgraphI2:
  assumes "subgraph H G" shows "subgraph H (G \<restriction> verts H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgraph H (G \<restriction> verts H)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
subgraph H G

goal (1 subgoal):
 1. subgraph H (G \<restriction> verts H)
[PROOF STEP]
by (auto simp: subgraph_def compatible_def wf_digraph.wellformed wf_digraph.wellformed_induce_subgraph)


[STATEMENT]
lemma find_indices_Cons:
  "find_indices x (y#ys) = (if x = y then Cons 0 else id) (map Suc (find_indices x ys))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_indices x (y # ys) = (if x = y then (#) 0 else id) (map Suc (find_indices x ys))
[PROOF STEP]
apply (unfold find_indices_def length_Cons, subst upt_conv_Cons, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter (\<lambda>i. (y # ys) ! i = x) (0 # [Suc 0..<Suc (length ys)]) = (if x = y then (#) 0 else id) (map Suc (filter (\<lambda>i. ys ! i = x) [0..<length ys]))
[PROOF STEP]
apply (fold map_Suc_upt, auto simp: filter_map o_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma length_normalise_decomp [simp]: "length (snd (normalise_decomp x y n)) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (snd (normalise_decomp x y n)) = n
[PROOF STEP]
by (induction x y n rule: normalise_decomp.induct) (auto split: prod.split)


[STATEMENT]
theorem gt_compat_fun: "t' >\<^sub>t t \<Longrightarrow> App s t' >\<^sub>t App s t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t' >\<^sub>t t \<Longrightarrow> App s t' >\<^sub>t App s t
[PROOF STEP]
unfolding basic_gt_iff_gt
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.kbo_std.gt t' t \<Longrightarrow> local.kbo_std.gt (App s t') (App s t)
[PROOF STEP]
by (rule kbo_std.gt_compat_fun[simplified])


[STATEMENT]
lemma (in Ring) tau_mem:"\<lbrakk>R module M; R module N; m \<in> carrier M;
      n \<in> carrier N; FM\<^bsub>R\<^esub> P M N\<rbrakk> \<Longrightarrow> tau R M N P (m, n) \<in> carrier P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; m \<in> carrier M; n \<in> carrier N; FM\<^bsub>R\<^esub> P M N\<rbrakk> \<Longrightarrow> tau R M N P (m, n) \<in> carrier P
[PROOF STEP]
apply (frule tau_func [of M N P], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; m \<in> carrier M; n \<in> carrier N; FM\<^bsub>R\<^esub> P M N; tau R M N P \<in> M \<times>\<^sub>c N \<rightarrow> carrier P\<rbrakk> \<Longrightarrow> tau R M N P (m, n) \<in> carrier P
[PROOF STEP]
apply (rule funcset_mem, assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; m \<in> carrier M; n \<in> carrier N; FM\<^bsub>R\<^esub> P M N; tau R M N P \<in> M \<times>\<^sub>c N \<rightarrow> carrier P\<rbrakk> \<Longrightarrow> (m, n) \<in> M \<times>\<^sub>c N
[PROOF STEP]
apply (simp add:prod_carr_mem)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ball_rad_0:
  assumes "is_ball B"
  assumes "B\<^bsub>m\<^esub>[c] \<subseteq> B\<^bsub>n\<^esub>[c]"
  assumes "c \<in> carrier Q\<^sub>p"
  shows "n \<le> m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
obtain b where b_def: "b \<in> carrier Q\<^sub>p \<and> val (b \<ominus>c) = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>b. b \<in> carrier Q\<^sub>p \<and> val (b \<ominus> c) = eint m \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson assms(3) dist_nonempty)
[PROOF STATE]
proof (state)
this:
b \<in> carrier Q\<^sub>p \<and> val (b \<ominus> c) = eint m

goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b \<in> carrier Q\<^sub>p \<and> val (b \<ominus> c) = eint m
[PROOF STEP]
have "b \<in> B\<^bsub>n\<^esub>[c]"
[PROOF STATE]
proof (prove)
using this:
b \<in> carrier Q\<^sub>p \<and> val (b \<ominus> c) = eint m

goal (1 subgoal):
 1. b \<in> B\<^bsub>n\<^esub>[c]
[PROOF STEP]
using assms c_ballI
[PROOF STATE]
proof (prove)
using this:
b \<in> carrier Q\<^sub>p \<and> val (b \<ominus> c) = eint m
is_ball B
B\<^bsub>m\<^esub>[c] \<subseteq> B\<^bsub>n\<^esub>[c]
c \<in> carrier Q\<^sub>p
\<lbrakk>?x \<in> carrier Q\<^sub>p; eint ?n \<le> val (?x \<ominus> ?c)\<rbrakk> \<Longrightarrow> ?x \<in> B\<^bsub>?n\<^esub>[?c]

goal (1 subgoal):
 1. b \<in> B\<^bsub>n\<^esub>[c]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
b \<in> B\<^bsub>n\<^esub>[c]

goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b \<in> B\<^bsub>n\<^esub>[c]
[PROOF STEP]
have "m \<ge> n"
[PROOF STATE]
proof (prove)
using this:
b \<in> B\<^bsub>n\<^esub>[c]

goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
using Q\<^sub>p_def Zp_def b_def c_ballE(2) padic_integers_axioms
[PROOF STATE]
proof (prove)
using this:
b \<in> B\<^bsub>n\<^esub>[c]
Q\<^sub>p \<equiv> Frac Z\<^sub>p
Z\<^sub>p \<equiv> padic_int p
b \<in> carrier Q\<^sub>p \<and> val (b \<ominus> c) = eint m
?x \<in> B\<^bsub>?n\<^esub>[?c] \<Longrightarrow> eint ?n \<le> val (?x \<ominus> ?c)
padic_integers p

goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
n \<le> m

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

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nonpos_Reals_add_I [simp]: "\<lbrakk>a \<in> \<real>\<^sub>\<le>\<^sub>0; b \<in> \<real>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> a + b \<in> \<real>\<^sub>\<le>\<^sub>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> \<real>\<^sub>\<le>\<^sub>0; b \<in> \<real>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> a + b \<in> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
by (metis nonneg_Reals_add_I add_uminus_conv_diff minus_diff_eq minus_minus uminus_nonpos_Reals_iff)


[STATEMENT]
lemma represents_mult_scalar:
  assumes "pmdl.represents B r x"
  shows "pmdl.represents B (punit.monom_mult c 0 r) (c \<odot> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmdl.represents B (punit.monom_mult c 0 r) (c \<odot> x)
[PROOF STEP]
unfolding punit.mult_scalar_monomial[symmetric] punit_mult_scalar
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmdl.represents B (monomial c 0 * r) (c \<odot> x)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
pmdl.represents B r x

goal (1 subgoal):
 1. pmdl.represents B (monomial c 0 * r) (c \<odot> x)
[PROOF STEP]
by (rule pmdl.represents_scale)


[STATEMENT]
lemma path_weightp_distinct_nonempty:
  "{xs. path_weightp l1 l2 xs} \<noteq> {} \<longleftrightarrow> {xs. path_weightp_distinct l1 l2 xs} \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({xs. path_weightp l1 l2 xs} \<noteq> {}) = ({xs. path_weightp_distinct l1 l2 xs} \<noteq> {})
[PROOF STEP]
by (auto dest: path_distinct simp: path_weightp_def path_weightp_distinct_def)


[STATEMENT]
lemma pm_of_poly_zero [simp]: "pm_of_poly x 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pm_of_poly x 0 = 0
[PROOF STEP]
by (rule poly_mapping_eqI) (simp add: pm_of_poly.rep_eq)


[STATEMENT]
lemma array_rel_def:
  "\<langle>R\<rangle>array_rel \<equiv> {(Array xs, Array ys)|xs ys. (xs,ys) \<in> \<langle>R\<rangle>list_rel}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>R\<rangle>array_rel \<equiv> {(Array xs, Array ys) |xs ys. (xs, ys) \<in> \<langle>R\<rangle>list_rel}
[PROOF STEP]
unfolding array_rel_def_internal relAPP_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(Array xs, Array ys) |xs ys. (xs, ys) \<in> list_rel R} \<equiv> {(Array xs, Array ys) |xs ys. (xs, ys) \<in> list_rel R}
[PROOF STEP]
.


[STATEMENT]
lemma (in ring_closed) coeff_mult_closed [intro]:
  "(\<And>x. coeff p x \<in> A) \<Longrightarrow> (\<And>x. coeff q x \<in> A) \<Longrightarrow> coeff (p * q) x \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. MPoly_Type.coeff p x \<in> A; \<And>x. MPoly_Type.coeff q x \<in> A\<rbrakk> \<Longrightarrow> MPoly_Type.coeff (p * q) x \<in> A
[PROOF STEP]
by (auto simp: coeff_mpoly_times prod_fun_closed)


[STATEMENT]
lemma bigo_lesseq2: "f =o O(h) \<Longrightarrow> \<forall>x. \<bar>g x\<bar> <= f x \<Longrightarrow>
      g =o O(h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> O(h); \<forall>x. \<bar>g x\<bar> \<le> f x\<rbrakk> \<Longrightarrow> g \<in> O(h)
[PROOF STEP]
apply (erule bigo_lesseq1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. \<bar>g x\<bar> \<le> f x \<Longrightarrow> \<forall>x. \<bar>g x\<bar> \<le> \<bar>f x\<bar>
[PROOF STEP]
apply (blast intro: abs_ge_self order_trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma not_summable_infsetsum_eq:
  "\<not>f abs_summable_on A \<Longrightarrow> infsetsum f A = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> f abs_summable_on A \<Longrightarrow> infsetsum f A = (0::'b)
[PROOF STEP]
by (simp add: abs_summable_on_def infsetsum_def not_integrable_integral_eq)


[STATEMENT]
lemma remdups_mset_singleton[simp]: "remdups_mset {#a#} = {#a#}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. remdups_mset {#a#} = {#a#}
[PROOF STEP]
unfolding remdups_mset_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset_set (set_mset {#a#}) = {#a#}
[PROOF STEP]
by auto


[STATEMENT]
theorem abs_conv_le_conv_abscissa_plus_1: "abs_conv_abscissa (f :: 'a fds) \<le> conv_abscissa f + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa f \<le> conv_abscissa f + 1
[PROOF STEP]
proof (rule abs_conv_abscissa_leI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
fix c
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
assume less: "conv_abscissa f + 1 < ereal c"
[PROOF STATE]
proof (state)
this:
conv_abscissa f + 1 < ereal c

goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
define c' where "c' = (if conv_abscissa f = -\<infinity> then c - 2
                     else (c - 1 + real_of_ereal (conv_abscissa f)) / 2)"
[PROOF STATE]
proof (state)
this:
c' = (if conv_abscissa f = - \<infinity> then c - 2 else (c - 1 + real_of_ereal (conv_abscissa f)) / 2)

goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
from less
[PROOF STATE]
proof (chain)
picking this:
conv_abscissa f + 1 < ereal c
[PROOF STEP]
have c': "conv_abscissa f < ereal c' \<and> c' < c - 1"
[PROOF STATE]
proof (prove)
using this:
conv_abscissa f + 1 < ereal c

goal (1 subgoal):
 1. conv_abscissa f < ereal c' \<and> c' < c - 1
[PROOF STEP]
by (cases "conv_abscissa f") (simp_all add: c'_def field_simps)
[PROOF STATE]
proof (state)
this:
conv_abscissa f < ereal c' \<and> c' < c - 1

goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
from c'
[PROOF STATE]
proof (chain)
picking this:
conv_abscissa f < ereal c' \<and> c' < c - 1
[PROOF STEP]
have "fds_converges f (of_real c')"
[PROOF STATE]
proof (prove)
using this:
conv_abscissa f < ereal c' \<and> c' < c - 1

goal (1 subgoal):
 1. fds_converges f (of_real c')
[PROOF STEP]
by (intro fds_converges) (simp_all add: inner_diff_left dot_square_norm)
[PROOF STATE]
proof (state)
this:
fds_converges f (of_real c')

goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
hence "fds_abs_converges f (of_real c)"
[PROOF STATE]
proof (prove)
using this:
fds_converges f (of_real c')

goal (1 subgoal):
 1. fds_abs_converges f (of_real c)
[PROOF STEP]
by (rule fds_converges_imp_abs_converges) (insert c', simp_all)
[PROOF STATE]
proof (state)
this:
fds_abs_converges f (of_real c)

goal (1 subgoal):
 1. \<And>c'. conv_abscissa f + 1 < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges f s
[PROOF STEP]
thus "\<exists>s. s \<bullet> 1 = c \<and> fds_abs_converges f s"
[PROOF STATE]
proof (prove)
using this:
fds_abs_converges f (of_real c)

goal (1 subgoal):
 1. \<exists>s. s \<bullet> (1::'a) = c \<and> fds_abs_converges f s
[PROOF STEP]
by (intro exI[of _ "of_real c"]) auto
[PROOF STATE]
proof (state)
this:
\<exists>s. s \<bullet> (1::'a) = c \<and> fds_abs_converges f s

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_eq_top_is_Top: "Top \<le> x \<Longrightarrow> x = Top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Top \<le> x \<Longrightarrow> x = Top
[PROOF STEP]
by (cases x) (simp_all add: less_eq_top_def)


[STATEMENT]
theorem infinite_soundness:
  assumes "wf t" and "good t" and "S \<in> structure"
  shows "sat S (fst (root t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat S (fst (tree.root t))
[PROOF STEP]
using F[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<not> sat S (fst (tree.root t)) \<Longrightarrow> False

goal (1 subgoal):
 1. sat S (fst (tree.root t))
[PROOF STEP]
by auto


[STATEMENT]
lemma Bex_set_replicate[simp]:
  "(\<exists>x \<in> set(replicate n a). P x) = (P a \<and> n\<noteq>0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x\<in>set (replicate n a). P x) = (P a \<and> n \<noteq> 0)
[PROOF STEP]
by(simp add: set_replicate_conv_if)


[STATEMENT]
lemma absolutely_integrable_abs:
  fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space"
  assumes "f absolutely_integrable_on S"
  shows "(\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S"
        (is "?g absolutely_integrable_on S")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S
[PROOF STEP]
have *: "(\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else 0) \<circ>
           (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else 0)) \<circ> f
           absolutely_integrable_on S"
        if "i \<in> Basis" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
have "bounded_linear (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_linear (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b))
[PROOF STEP]
by (simp add: linear_linear algebra_simps linearI)
[PROOF STATE]
proof (state)
this:
bounded_linear (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b))

goal (1 subgoal):
 1. (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
bounded_linear (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b))

goal (1 subgoal):
 1. (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
have "(\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else 0)) \<circ> f
                   absolutely_integrable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
using assms \<open>i \<in> Basis\<close>
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on S
i \<in> Basis

goal (1 subgoal):
 1. (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
unfolding o_def
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on S
i \<in> Basis

goal (1 subgoal):
 1. (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (f x \<bullet> i) *\<^sub>R j else (0::'b))) absolutely_integrable_on S
[PROOF STEP]
by (intro absolutely_integrable_norm [unfolded o_def])
         (auto simp: algebra_simps dest: absolutely_integrable_component)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S

goal (1 subgoal):
 1. (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
bounded_linear (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b))
(\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
bounded_linear (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b))
(\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S

goal (1 subgoal):
 1. (\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S
[PROOF STEP]
by (subst comp_assoc) (blast intro: absolutely_integrable_linear)
[PROOF STATE]
proof (state)
this:
(\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i \<in> Basis \<Longrightarrow> (\<lambda>y. \<Sum>j\<in>Basis. if j = ?i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = ?i then (x \<bullet> ?i) *\<^sub>R j else (0::'b))) \<circ> f absolutely_integrable_on S

goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S
[PROOF STEP]
have eq: "?g =
        (\<lambda>x. \<Sum>i\<in>Basis. ((\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else 0) \<circ>
               (\<lambda>x. norm(\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else 0)) \<circ> f) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) = (\<lambda>x. \<Sum>i\<in>Basis. ((\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f) x)
[PROOF STEP]
by (simp)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) = (\<lambda>x. \<Sum>i\<in>Basis. ((\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f) x)

goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S
[PROOF STEP]
unfolding eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>Basis. ((\<lambda>y. \<Sum>j\<in>Basis. if j = i then y *\<^sub>R j else (0::'b)) \<circ> (\<lambda>x. norm (\<Sum>j\<in>Basis. if j = i then (x \<bullet> i) *\<^sub>R j else (0::'b))) \<circ> f) x) absolutely_integrable_on S
[PROOF STEP]
by (rule absolutely_integrable_sum) (force simp: intro!: *)+
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<Sum>i\<in>Basis. \<bar>f x \<bullet> i\<bar> *\<^sub>R i) absolutely_integrable_on S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma le_floor_iff: "z \<le> \<lfloor>x\<rfloor> \<longleftrightarrow> of_int z \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (z \<le> \<lfloor>x\<rfloor>) = (of_int z \<le> x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
assume "z \<le> \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (state)
this:
z \<le> \<lfloor>x\<rfloor>

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
have "(of_int z :: 'a) \<le> of_int \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
z \<le> \<lfloor>x\<rfloor>

goal (1 subgoal):
 1. of_int z \<le> of_int \<lfloor>x\<rfloor>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int \<lfloor>x\<rfloor>

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int \<lfloor>x\<rfloor>

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
have "of_int \<lfloor>x\<rfloor> \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int \<lfloor>x\<rfloor> \<le> x
[PROOF STEP]
by (rule of_int_floor_le)
[PROOF STATE]
proof (state)
this:
of_int \<lfloor>x\<rfloor> \<le> x

goal (2 subgoals):
 1. z \<le> \<lfloor>x\<rfloor> \<Longrightarrow> of_int z \<le> x
 2. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
of_int z \<le> x
[PROOF STEP]
show "of_int z \<le> x"
[PROOF STATE]
proof (prove)
using this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
assume "of_int z \<le> x"
[PROOF STATE]
proof (state)
this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int z \<le> x

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
have "x < of_int (\<lfloor>x\<rfloor> + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < of_int (\<lfloor>x\<rfloor> + 1)
[PROOF STEP]
using floor_correct
[PROOF STATE]
proof (prove)
using this:
of_int \<lfloor>?x\<rfloor> \<le> ?x \<and> ?x < of_int (\<lfloor>?x\<rfloor> + 1)

goal (1 subgoal):
 1. x < of_int (\<lfloor>x\<rfloor> + 1)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
x < of_int (\<lfloor>x\<rfloor> + 1)

goal (1 subgoal):
 1. of_int z \<le> x \<Longrightarrow> z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
of_int z < of_int (\<lfloor>x\<rfloor> + 1)
[PROOF STEP]
show "z \<le> \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
of_int z < of_int (\<lfloor>x\<rfloor> + 1)

goal (1 subgoal):
 1. z \<le> \<lfloor>x\<rfloor>
[PROOF STEP]
by (simp del: of_int_add)
[PROOF STATE]
proof (state)
this:
z \<le> \<lfloor>x\<rfloor>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Rat_induct_pos [case_names Fract, induct type: rat]:
  assumes step: "\<And>a b. 0 < b \<Longrightarrow> P (Fract a b)"
  shows "P q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P q
[PROOF STEP]
proof (cases q)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>q = Fract a b; 0 < b; coprime a b\<rbrakk> \<Longrightarrow> P q
[PROOF STEP]
case (Fract a b)
[PROOF STATE]
proof (state)
this:
q = Fract a b
0 < b
coprime a b

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>q = Fract a b; 0 < b; coprime a b\<rbrakk> \<Longrightarrow> P q
[PROOF STEP]
have step': "P (Fract a b)" if b: "b < 0" for a b :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (Fract a b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P (Fract a b)
[PROOF STEP]
from b
[PROOF STATE]
proof (chain)
picking this:
b < 0
[PROOF STEP]
have "0 < - b"
[PROOF STATE]
proof (prove)
using this:
b < 0

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

goal (1 subgoal):
 1. P (Fract a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < - b
[PROOF STEP]
have "P (Fract (- a) (- b))"
[PROOF STATE]
proof (prove)
using this:
0 < - b

goal (1 subgoal):
 1. P (Fract (- a) (- b))
[PROOF STEP]
by (rule step)
[PROOF STATE]
proof (state)
this:
P (Fract (- a) (- b))

goal (1 subgoal):
 1. P (Fract a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P (Fract (- a) (- b))
[PROOF STEP]
show "P (Fract a b)"
[PROOF STATE]
proof (prove)
using this:
P (Fract (- a) (- b))

goal (1 subgoal):
 1. P (Fract a b)
[PROOF STEP]
by (simp add: order_less_imp_not_eq [OF b])
[PROOF STATE]
proof (state)
this:
P (Fract a b)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?b < 0 \<Longrightarrow> P (Fract ?a ?b)

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>q = Fract a b; 0 < b; coprime a b\<rbrakk> \<Longrightarrow> P q
[PROOF STEP]
from Fract
[PROOF STATE]
proof (chain)
picking this:
q = Fract a b
0 < b
coprime a b
[PROOF STEP]
show "P q"
[PROOF STATE]
proof (prove)
using this:
q = Fract a b
0 < b
coprime a b

goal (1 subgoal):
 1. P q
[PROOF STEP]
by (auto simp add: linorder_neq_iff step step')
[PROOF STATE]
proof (state)
this:
P q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma i_Exec_Stream_Acc_Output_Init_1: "
  i_Exec_Comp_Stream_Acc_Output_Init (Suc 0) output_fun trans_fun input c =
  output_fun \<circ> (i_Exec_Comp_Stream_Init trans_fun input c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i_Exec_Comp_Stream_Acc_Output_Init (Suc 0) output_fun trans_fun input c = output_fun \<circ> i_Exec_Comp_Stream_Init trans_fun input c
[PROOF STEP]
by (simp add: i_Exec_Comp_Stream_Acc_Output_Init_def i_Exec_Stream_Init_eq_i_Exec_Stream_Cons)


[STATEMENT]
lemma poly_sgnx_left_right:
  fixes c a::real and p::"real poly"
  assumes "p\<noteq>0"
  shows "sgnx (poly p) (at_left a) = (if even (order a p)
            then sgnx (poly p) (at_right a)
            else -sgnx (poly p) (at_right a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
proof (induction "degree p" arbitrary: p rule: less_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p. \<lbrakk>\<And>pa. \<lbrakk>degree pa < degree p; pa \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly pa) (at_left a) = (if even (order a pa) then sgnx (poly pa) (at_right a) else - sgnx (poly pa) (at_right a)); p \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
case less
[PROOF STATE]
proof (state)
this:
\<lbrakk>degree ?p < degree p; ?p \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly ?p) (at_left a) = (if even (order a ?p) then sgnx (poly ?p) (at_right a) else - sgnx (poly ?p) (at_right a))
p \<noteq> 0

goal (1 subgoal):
 1. \<And>p. \<lbrakk>\<And>pa. \<lbrakk>degree pa < degree p; pa \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly pa) (at_left a) = (if even (order a pa) then sgnx (poly pa) (at_right a) else - sgnx (poly pa) (at_right a)); p \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have ?case when "poly p a\<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have "sgnx (poly p) (at_left a) = sgn (poly p a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = sgn (poly p a)
[PROOF STEP]
by (simp add: has_sgnx_imp_sgnx tendsto_nonzero_has_sgnx that)
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = sgn (poly p a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = sgn (poly p a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have "sgnx (poly p) (at_right a) = sgn (poly p a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgn (poly p a)
[PROOF STEP]
by (simp add: has_sgnx_imp_sgnx tendsto_nonzero_has_sgnx that)
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgn (poly p a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgn (poly p a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have "order a p = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order a p = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
poly p a \<noteq> 0

goal (1 subgoal):
 1. order a p = 0
[PROOF STEP]
by (simp add: order_0I)
[PROOF STATE]
proof (state)
this:
order a p = 0

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sgnx (poly p) (at_left a) = sgn (poly p a)
sgnx (poly p) (at_right a) = sgn (poly p a)
order a p = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sgnx (poly p) (at_left a) = sgn (poly p a)
sgnx (poly p) (at_right a) = sgn (poly p a)
order a p = 0

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
poly p a \<noteq> 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal (1 subgoal):
 1. \<And>p. \<lbrakk>\<And>pa. \<lbrakk>degree pa < degree p; pa \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly pa) (at_left a) = (if even (order a pa) then sgnx (poly pa) (at_right a) else - sgnx (poly pa) (at_right a)); p \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
poly p a \<noteq> 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal (1 subgoal):
 1. \<And>p. \<lbrakk>\<And>pa. \<lbrakk>degree pa < degree p; pa \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly pa) (at_left a) = (if even (order a pa) then sgnx (poly pa) (at_right a) else - sgnx (poly pa) (at_right a)); p \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have ?case when "poly p a=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
obtain q where pq:"p= [:-a,1:] * q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q. p = [:- a, 1:] * q \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>poly p a=0\<close>
[PROOF STATE]
proof (prove)
using this:
poly p a = 0

goal (1 subgoal):
 1. (\<And>q. p = [:- a, 1:] * q \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson dvdE poly_eq_0_iff_dvd)
[PROOF STATE]
proof (state)
this:
p = [:- a, 1:] * q

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p = [:- a, 1:] * q
[PROOF STEP]
have "q\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
p = [:- a, 1:] * q

goal (1 subgoal):
 1. q \<noteq> 0
[PROOF STEP]
using \<open>p\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
p = [:- a, 1:] * q
p \<noteq> 0

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

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
q \<noteq> 0
[PROOF STEP]
have "degree q < degree p"
[PROOF STATE]
proof (prove)
using this:
q \<noteq> 0

goal (1 subgoal):
 1. degree q < degree p
[PROOF STEP]
unfolding pq
[PROOF STATE]
proof (prove)
using this:
q \<noteq> 0

goal (1 subgoal):
 1. degree q < degree ([:- a, 1:] * q)
[PROOF STEP]
by (subst degree_mult_eq,auto)
[PROOF STATE]
proof (state)
this:
degree q < degree p

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have "sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
[PROOF STEP]
have "sgnx (\<lambda>x. poly p x) (at_left a)
          = sgnx (poly q) (at_left a) * sgnx (poly [:-a,1:]) (at_left a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)
[PROOF STEP]
unfolding pq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly ([:- a, 1:] * q)) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)
[PROOF STEP]
apply (subst poly_mult)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (\<lambda>x. poly [:- a, 1:] x * poly q x) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)
[PROOF STEP]
apply (subst sgnx_times)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. at_left a \<noteq> bot
 2. poly [:- a, 1:] sgnx_able at_left a
 3. poly q sgnx_able at_left a
 4. sgnx (poly [:- a, 1:]) (at_left a) * sgnx (poly q) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
[PROOF STEP]
have "sgnx (\<lambda>x. poly [:-a,1:] x) (at_left a) = -1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly [:- a, 1:]) (at_left a) = - 1
[PROOF STEP]
apply (intro has_sgnx_imp_sgnx)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (poly [:- a, 1:] has_sgnx - 1) (at_left a)
 2. at_left a \<noteq> bot
[PROOF STEP]
unfolding has_sgnx_def eventually_at_left
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>b<a. \<forall>y>b. y < a \<longrightarrow> sgn (poly [:- a, 1:] y) = - 1
 2. at_left a \<noteq> bot
[PROOF STEP]
by (auto simp add: linordered_field_no_lb)
[PROOF STATE]
proof (state)
this:
sgnx (poly [:- a, 1:]) (at_left a) = - 1

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sgnx (poly p) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)
sgnx (poly [:- a, 1:]) (at_left a) = - 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sgnx (poly p) (at_left a) = sgnx (poly q) (at_left a) * sgnx (poly [:- a, 1:]) (at_left a)
sgnx (poly [:- a, 1:]) (at_left a) = - 1

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have "sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
[PROOF STEP]
have "sgnx (\<lambda>x. poly p x) (at_right a)
          = sgnx (poly q) (at_right a) * sgnx (poly [:-a,1:]) (at_right a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)
[PROOF STEP]
unfolding pq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly ([:- a, 1:] * q)) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)
[PROOF STEP]
apply (subst poly_mult)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (\<lambda>x. poly [:- a, 1:] x * poly q x) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)
[PROOF STEP]
apply (subst sgnx_times)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. at_right a \<noteq> bot
 2. poly [:- a, 1:] sgnx_able at_right a
 3. poly q sgnx_able at_right a
 4. sgnx (poly [:- a, 1:]) (at_right a) * sgnx (poly q) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)

goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)

goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
[PROOF STEP]
have "sgnx (\<lambda>x. poly [:-a,1:] x) (at_right a) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgnx (poly [:- a, 1:]) (at_right a) = 1
[PROOF STEP]
apply (intro has_sgnx_imp_sgnx)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (poly [:- a, 1:] has_sgnx 1) (at_right a)
 2. at_right a \<noteq> bot
[PROOF STEP]
unfolding has_sgnx_def eventually_at_right
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>b>a. \<forall>y>a. y < b \<longrightarrow> sgn (poly [:- a, 1:] y) = 1
 2. at_right a \<noteq> bot
[PROOF STEP]
by (auto simp add: linordered_field_no_ub)
[PROOF STATE]
proof (state)
this:
sgnx (poly [:- a, 1:]) (at_right a) = 1

goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)
sgnx (poly [:- a, 1:]) (at_right a) = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a) * sgnx (poly [:- a, 1:]) (at_right a)
sgnx (poly [:- a, 1:]) (at_right a) = 1

goal (1 subgoal):
 1. sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
have "even (order a p) \<longleftrightarrow> odd (order a q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (order a p) = odd (order a q)
[PROOF STEP]
unfolding pq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (order a ([:- a, 1:] * q)) = odd (order a q)
[PROOF STEP]
apply (subst order_mult[OF \<open>p \<noteq> 0\<close>[unfolded pq]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (order a [:- a, 1:] + order a q) = odd (order a q)
[PROOF STEP]
using  \<open>q\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
q \<noteq> 0

goal (1 subgoal):
 1. even (order a [:- a, 1:] + order a q) = odd (order a q)
[PROOF STEP]
by (auto simp add:order_power_n_n[of _ 1, simplified])
[PROOF STATE]
proof (state)
this:
even (order a p) = odd (order a q)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
even (order a p) = odd (order a q)

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
note less.hyps[OF \<open>degree q < degree p\<close> \<open>q\<noteq>0\<close>]
[PROOF STATE]
proof (state)
this:
sgnx (poly q) (at_left a) = (if even (order a q) then sgnx (poly q) (at_right a) else - sgnx (poly q) (at_right a))

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
even (order a p) = odd (order a q)
sgnx (poly q) (at_left a) = (if even (order a q) then sgnx (poly q) (at_right a) else - sgnx (poly q) (at_right a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sgnx (poly p) (at_left a) = - sgnx (poly q) (at_left a)
sgnx (poly p) (at_right a) = sgnx (poly q) (at_right a)
even (order a p) = odd (order a q)
sgnx (poly q) (at_left a) = (if even (order a q) then sgnx (poly q) (at_right a) else - sgnx (poly q) (at_right a))

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
poly p a = 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal (1 subgoal):
 1. \<And>p. \<lbrakk>\<And>pa. \<lbrakk>degree pa < degree p; pa \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly pa) (at_left a) = (if even (order a pa) then sgnx (poly pa) (at_right a) else - sgnx (poly pa) (at_right a)); p \<noteq> 0\<rbrakk> \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
poly p a \<noteq> 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
poly p a = 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
poly p a \<noteq> 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
poly p a = 0 \<Longrightarrow> sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal (1 subgoal):
 1. sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sgnx (poly p) (at_left a) = (if even (order a p) then sgnx (poly p) (at_right a) else - sgnx (poly p) (at_right a))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tllist_ord_trans [trans]: "\<lbrakk> tllist_ord xs ys; tllist_ord ys zs \<rbrakk> \<Longrightarrow> tllist_ord xs zs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>local.tllist_ord xs ys; local.tllist_ord ys zs\<rbrakk> \<Longrightarrow> local.tllist_ord xs zs
[PROOF STEP]
by transfer(auto simp add: flat_ord_def split: if_split_asm intro: lprefix_trans)


[STATEMENT]
lemma Gleason9_34:
  assumes "cut A" "0 < u"
  shows "\<exists>r \<in> A. r + u \<notin> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>r\<in>A. r + u \<notin> A
[PROOF STEP]
using assms Gleason9_34_contra preal_exists_bound
[PROOF STATE]
proof (prove)
using this:
Dedekind_Real.cut A
0 < u
\<lbrakk>Dedekind_Real.cut ?A; \<forall>x\<in>?A. x + ?u \<in> ?A; 0 < ?u; 0 < ?y; ?y \<notin> ?A\<rbrakk> \<Longrightarrow> False
Dedekind_Real.cut ?A \<Longrightarrow> \<exists>x>0. x \<notin> ?A

goal (1 subgoal):
 1. \<exists>r\<in>A. r + u \<notin> A
[PROOF STEP]
by blast


[STATEMENT]
lemma (in abelian_subgroup) a_inv_op_closed2:
  shows "\<lbrakk>x \<in> carrier G; h \<in> H\<rbrakk> \<Longrightarrow> x \<oplus> h \<oplus> (\<ominus> x) \<in> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier G; h \<in> H\<rbrakk> \<Longrightarrow> x \<oplus> h \<oplus> \<ominus> x \<in> H
[PROOF STEP]
by (rule normal.inv_op_closed2 [OF a_normal,
    folded a_inv_def, simplified monoid_record_simps])


[STATEMENT]
lemma product_reachable[simp]: "c.reachable (product A B) (p, q) \<subseteq> a.reachable A p \<times> b.reachable B q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c.reachable' (product A B) (p, q) \<subseteq> a.reachable' A p \<times> b.reachable' B q
[PROOF STEP]
unfolding c.reachable_alt_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {c.target (product A B) r (p, q) |r. c.path' (product A B) r (p, q)} \<subseteq> a.reachable' A p \<times> b.reachable' B q
[PROOF STEP]
by auto


[STATEMENT]
lemma (in cring) associated_iff_same_ideal:
  assumes "a \<in> carrier R" "b \<in> carrier R"
  shows "a \<sim> b \<longleftrightarrow> PIdl a = PIdl b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<sim> b = (PIdl a = PIdl b)
[PROOF STEP]
unfolding associated_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a divides b \<and> b divides a) = (PIdl a = PIdl b)
[PROOF STEP]
using to_contain_is_to_divide[OF assms]
        to_contain_is_to_divide[OF assms(2,1)]
[PROOF STATE]
proof (prove)
using this:
(PIdl b \<subseteq> PIdl a) = a divides b
(PIdl a \<subseteq> PIdl b) = b divides a

goal (1 subgoal):
 1. (a divides b \<and> b divides a) = (PIdl a = PIdl b)
[PROOF STEP]
by auto


[STATEMENT]
lemma simple_bochner_integral_minus:
  assumes f: "simple_bochner_integrable M f"
  shows "simple_bochner_integral M (\<lambda>x. - f x) = - simple_bochner_integral M f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simple_bochner_integral M (\<lambda>x. - f x) = - simple_bochner_integral M f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. simple_bochner_integral M (\<lambda>x. - f x) = - simple_bochner_integral M f
[PROOF STEP]
from linear_uminus f
[PROOF STATE]
proof (chain)
picking this:
linear uminus
simple_bochner_integrable M f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
linear uminus
simple_bochner_integrable M f

goal (1 subgoal):
 1. simple_bochner_integral M (\<lambda>x. - f x) = - simple_bochner_integral M f
[PROOF STEP]
by (rule simple_bochner_integral_linear)
[PROOF STATE]
proof (state)
this:
simple_bochner_integral M (\<lambda>x. - f x) = - simple_bochner_integral M f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_at_bot_at_top:
  fixes p :: "real poly"
  assumes "degree p \<ge> 1" "coeff p (degree p) < 0"
  shows "LIM x at_top. poly p x :> at_bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim (poly p) at_bot at_top
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. filterlim (poly p) at_bot at_top
[PROOF STEP]
from poly_at_top_at_top[of "-p"] and assms
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>1 \<le> degree (- p); 0 < lead_coeff (- p)\<rbrakk> \<Longrightarrow> filterlim (poly (- p)) at_top at_top
1 \<le> degree p
lead_coeff p < 0
[PROOF STEP]
have "LIM x at_top. -poly p x :> at_top"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>1 \<le> degree (- p); 0 < lead_coeff (- p)\<rbrakk> \<Longrightarrow> filterlim (poly (- p)) at_top at_top
1 \<le> degree p
lead_coeff p < 0

goal (1 subgoal):
 1. LIM x at_top. - poly p x :> at_top
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
LIM x at_top. - poly p x :> at_top

goal (1 subgoal):
 1. filterlim (poly p) at_bot at_top
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x at_top. - poly p x :> at_top

goal (1 subgoal):
 1. filterlim (poly p) at_bot at_top
[PROOF STEP]
by (simp add: filterlim_uminus_at_bot)
[PROOF STATE]
proof (state)
this:
filterlim (poly p) at_bot at_top

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma homology_dimension_reduced:
  assumes "topspace X = {a}"
  shows "trivial_group (reduced_homology_group p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial_group (reduced_homology_group p X)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. trivial_group (reduced_homology_group p X)
[PROOF STEP]
have iso: "(hom_induced p X {} (discrete_topology {()}) {} (\<lambda>x. ()))
           \<in> iso (homology_group p X) (homology_group p (discrete_topology {()}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p X {} (discrete_topology {()}) {} (\<lambda>x. ()) \<in> Group.iso (homology_group p X) (homology_group p (discrete_topology {()}))
[PROOF STEP]
apply (rule homeomorphic_map_homology_iso)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphic_map X (discrete_topology {()}) (\<lambda>x. ())
[PROOF STEP]
apply (force simp: homeomorphic_map_maps homeomorphic_maps_def assms)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
hom_induced p X {} (discrete_topology {()}) {} (\<lambda>x. ()) \<in> Group.iso (homology_group p X) (homology_group p (discrete_topology {()}))

goal (1 subgoal):
 1. trivial_group (reduced_homology_group p X)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial_group (reduced_homology_group p X)
[PROOF STEP]
unfolding reduced_homology_group_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial_group (subgroup_generated (homology_group p X) (kernel (homology_group p X) (homology_group p (discrete_topology {()})) (hom_induced p X {} (discrete_topology {()}) {} (\<lambda>x. ()))))
[PROOF STEP]
by (rule group.trivial_group_subgroup_generated) (use iso in \<open>auto simp: iso_kernel_image\<close>)
[PROOF STATE]
proof (state)
this:
trivial_group (reduced_homology_group p X)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bit_of_nat_iff_bit [bit_simps]:
  \<open>bit (of_nat m) n \<longleftrightarrow> bit m n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bit (of_nat m) n = bit m n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bit (of_nat m) n = bit m n
[PROOF STEP]
have \<open>even (m div 2 ^ n) \<longleftrightarrow> even (of_nat (m div 2 ^ n))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (m div 2 ^ n) = even (of_nat (m div 2 ^ n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
even (m div 2 ^ n) = even (of_nat (m div 2 ^ n))

goal (1 subgoal):
 1. bit (of_nat m) n = bit m n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
even (m div 2 ^ n) = even (of_nat (m div 2 ^ n))

goal (1 subgoal):
 1. bit (of_nat m) n = bit m n
[PROOF STEP]
have \<open>of_nat (m div 2 ^ n) = of_nat m div of_nat (2 ^ n)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (m div 2 ^ n) = of_nat m div of_nat (2 ^ n)
[PROOF STEP]
by (simp add: of_nat_div)
[PROOF STATE]
proof (state)
this:
of_nat (m div 2 ^ n) = of_nat m div of_nat (2 ^ n)

goal (1 subgoal):
 1. bit (of_nat m) n = bit m n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
even (m div 2 ^ n) = even (of_nat m div of_nat (2 ^ n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
even (m div 2 ^ n) = even (of_nat m div of_nat (2 ^ n))

goal (1 subgoal):
 1. bit (of_nat m) n = bit m n
[PROOF STEP]
by (simp add: bit_iff_odd semiring_bits_class.bit_iff_odd)
[PROOF STATE]
proof (state)
this:
bit (of_nat m) n = bit m n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma corollary5:
  assumes T: "\<forall>a b. \<exists>a1 b1 d. a = a1 * d \<and> b = b1 * d
        \<and> ideal_generated {a1, b1} = ideal_generated {1::'a}"
 and i2: "ideal_generated {a,b,c} = ideal_generated {d}"
  shows "\<exists> a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d
  \<and> ideal_generated {a1,b1,c1} = ideal_generated {1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have da: "d dvd a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d dvd a
[PROOF STEP]
using ideal_generated_singleton_dvd[OF i2]
[PROOF STATE]
proof (prove)
using this:
?x \<in> {a, b, c} \<Longrightarrow> d dvd ?x

goal (1 subgoal):
 1. d dvd a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
d dvd a

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have db: "d dvd b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d dvd b
[PROOF STEP]
using ideal_generated_singleton_dvd[OF i2]
[PROOF STATE]
proof (prove)
using this:
?x \<in> {a, b, c} \<Longrightarrow> d dvd ?x

goal (1 subgoal):
 1. d dvd b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
d dvd b

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have dc: "d dvd c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d dvd c
[PROOF STEP]
using ideal_generated_singleton_dvd[OF i2]
[PROOF STATE]
proof (prove)
using this:
?x \<in> {a, b, c} \<Longrightarrow> d dvd ?x

goal (1 subgoal):
 1. d dvd c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
d dvd c

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
d dvd c
[PROOF STEP]
obtain c1' where c: "c = c1' * d"
[PROOF STATE]
proof (prove)
using this:
d dvd c

goal (1 subgoal):
 1. (\<And>c1'. c = c1' * d \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using dvd_def mult_ac(2)
[PROOF STATE]
proof (prove)
using this:
d dvd c
(?b dvd ?a) = (\<exists>k. ?a = ?b * k)
?a * ?b = ?b * ?a

goal (1 subgoal):
 1. (\<And>c1'. c = c1' * d \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
c = c1' * d

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
obtain a1 b1 d' where a: "a = a1 * d'" and b: "b = b1 * d' "
    and i: "ideal_generated {a1, b1} = ideal_generated {1::'a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a1 d' b1. \<lbrakk>a = a1 * d'; b = b1 * d'; ideal_generated {a1, b1} = ideal_generated {1::'a}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using T
[PROOF STATE]
proof (prove)
using this:
\<forall>a b. \<exists>a1 b1 d. a = a1 * d \<and> b = b1 * d \<and> ideal_generated {a1, b1} = ideal_generated {1::'a}

goal (1 subgoal):
 1. (\<And>a1 d' b1. \<lbrakk>a = a1 * d'; b = b1 * d'; ideal_generated {a1, b1} = ideal_generated {1::'a}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a = a1 * d'
b = b1 * d'
ideal_generated {a1, b1} = ideal_generated {1::'a}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have i_ab_d': "ideal_generated {a, b} = ideal_generated {d'}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ideal_generated {a, b} = ideal_generated {d'}
[PROOF STEP]
by (simp add: a b i lemma4_prev)
[PROOF STATE]
proof (state)
this:
ideal_generated {a, b} = ideal_generated {d'}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have i2: "ideal_generated {d', c} = ideal_generated {d}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ideal_generated {d', c} = ideal_generated {d}
[PROOF STEP]
by (rule ideal_generated_triple_pair_rewrite[OF i2 i_ab_d'])
[PROOF STATE]
proof (state)
this:
ideal_generated {d', c} = ideal_generated {d}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
obtain u v dp  where d'1: "d' = u * dp" and d'2: "c = v * dp"
    and xy: "ideal_generated{u,v}=ideal_generated{1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>u dp v. \<lbrakk>d' = u * dp; c = v * dp; ideal_generated {u, v} = ideal_generated {1::'a}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using T
[PROOF STATE]
proof (prove)
using this:
\<forall>a b. \<exists>a1 b1 d. a = a1 * d \<and> b = b1 * d \<and> ideal_generated {a1, b1} = ideal_generated {1::'a}

goal (1 subgoal):
 1. (\<And>u dp v. \<lbrakk>d' = u * dp; c = v * dp; ideal_generated {u, v} = ideal_generated {1::'a}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
d' = u * dp
c = v * dp
ideal_generated {u, v} = ideal_generated {1::'a}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have "\<exists>a1' b1'. d' = a1' * d \<and> c = b1' * d \<and> ideal_generated {a1', b1'} = ideal_generated {1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a1' b1'. d' = a1' * d \<and> c = b1' * d \<and> ideal_generated {a1', b1'} = ideal_generated {1::'a}
[PROOF STEP]
by (rule lemma4[OF d'1 d'2 xy i2])
[PROOF STATE]
proof (state)
this:
\<exists>a1' b1'. d' = a1' * d \<and> c = b1' * d \<and> ideal_generated {a1', b1'} = ideal_generated {1::'a}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>a1' b1'. d' = a1' * d \<and> c = b1' * d \<and> ideal_generated {a1', b1'} = ideal_generated {1::'a}
[PROOF STEP]
obtain a1' c1 where d'_a1: "d' = a1' * d" and c: "c = c1 * d"
    and i3: "ideal_generated {a1', c1} = ideal_generated {1}"
[PROOF STATE]
proof (prove)
using this:
\<exists>a1' b1'. d' = a1' * d \<and> c = b1' * d \<and> ideal_generated {a1', b1'} = ideal_generated {1::'a}

goal (1 subgoal):
 1. (\<And>a1' c1. \<lbrakk>d' = a1' * d; c = c1 * d; ideal_generated {a1', c1} = ideal_generated {1::'a}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
d' = a1' * d
c = c1 * d
ideal_generated {a1', c1} = ideal_generated {1::'a}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have r1: "a = a1 * a1' * d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a = a1 * a1' * d
[PROOF STEP]
by (simp add: d'_a1 a local.semiring_normalization_rules(18))
[PROOF STATE]
proof (state)
this:
a = a1 * a1' * d

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have r2: "b = b1 * a1' * d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b = b1 * a1' * d
[PROOF STEP]
by (simp add: d'_a1 b local.semiring_normalization_rules(18))
[PROOF STATE]
proof (state)
this:
b = b1 * a1' * d

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
have i4: "ideal_generated {a1 * a1',b1 * a1', c1} = ideal_generated {1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
obtain p q where 1: "p * a1' + q * c1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>p q. p * a1' + q * c1 = (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using i3
[PROOF STATE]
proof (prove)
using this:
ideal_generated {a1', c1} = ideal_generated {1::'a}

goal (1 subgoal):
 1. (\<And>p q. p * a1' + q * c1 = (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding ideal_generated_pair_exists_UNIV
[PROOF STATE]
proof (prove)
using this:
\<exists>p q. p * a1' + q * c1 = (1::'a)

goal (1 subgoal):
 1. (\<And>p q. p * a1' + q * c1 = (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p * a1' + q * c1 = (1::'a)

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
obtain x y where 2: "x*a1 + y*b1 = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x y. x * a1 + y * b1 = p \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ideal_generated_UNIV_obtain_pair[OF i]
[PROOF STATE]
proof (prove)
using this:
\<exists>p q. p * a1 + q * b1 = ?d

goal (1 subgoal):
 1. (\<And>x y. x * a1 + y * b1 = p \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x * a1 + y * b1 = p

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
have "1 = (x*a1 + y*b1) * a1' + q * c1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) = (x * a1 + y * b1) * a1' + q * c1
[PROOF STEP]
using 1 2
[PROOF STATE]
proof (prove)
using this:
p * a1' + q * c1 = (1::'a)
x * a1 + y * b1 = p

goal (1 subgoal):
 1. (1::'a) = (x * a1 + y * b1) * a1' + q * c1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(1::'a) = (x * a1 + y * b1) * a1' + q * c1

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) = (x * a1 + y * b1) * a1' + q * c1

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
have "... = x*a1*a1' + y*b1*a1' + q * c1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x * a1 + y * b1) * a1' + q * c1 = x * a1 * a1' + y * b1 * a1' + q * c1
[PROOF STEP]
by (simp add: local.ring_distribs(2))
[PROOF STATE]
proof (state)
this:
(x * a1 + y * b1) * a1' + q * c1 = x * a1 * a1' + y * b1 * a1' + q * c1

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(1::'a) = x * a1 * a1' + y * b1 * a1' + q * c1
[PROOF STEP]
have "1 = x*a1*a1' + y*b1*a1' + q * c1"
[PROOF STATE]
proof (prove)
using this:
(1::'a) = x * a1 * a1' + y * b1 * a1' + q * c1

goal (1 subgoal):
 1. (1::'a) = x * a1 * a1' + y * b1 * a1' + q * c1
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(1::'a) = x * a1 * a1' + y * b1 * a1' + q * c1

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
hence "1 \<in> ideal_generated {a1 * a1', b1 * a1', c1}"
[PROOF STATE]
proof (prove)
using this:
(1::'a) = x * a1 * a1' + y * b1 * a1' + q * c1

goal (1 subgoal):
 1. (1::'a) \<in> ideal_generated {a1 * a1', b1 * a1', c1}
[PROOF STEP]
using ideal_explicit2[of "{a1 * a1', b1 * a1', c1}"] sum_three_elements'
[PROOF STATE]
proof (prove)
using this:
(1::'a) = x * a1 * a1' + y * b1 * a1' + q * c1
finite {a1 * a1', b1 * a1', c1} \<Longrightarrow> ideal_generated {a1 * a1', b1 * a1', c1} = {y. \<exists>f. (\<Sum>i\<in>{a1 * a1', b1 * a1', c1}. f i * i) = y}
\<exists>f. (\<Sum>i\<in>{?a, ?b, ?c}. f i * i) = ?x * ?a + ?y * ?b + ?z * ?c

goal (1 subgoal):
 1. (1::'a) \<in> ideal_generated {a1 * a1', b1 * a1', c1}
[PROOF STEP]
by (simp add: mult_assoc)
[PROOF STATE]
proof (state)
this:
(1::'a) \<in> ideal_generated {a1 * a1', b1 * a1', c1}

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
hence "ideal_generated {1} \<subseteq> ideal_generated {a1 * a1',b1 * a1', c1}"
[PROOF STATE]
proof (prove)
using this:
(1::'a) \<in> ideal_generated {a1 * a1', b1 * a1', c1}

goal (1 subgoal):
 1. ideal_generated {1::'a} \<subseteq> ideal_generated {a1 * a1', b1 * a1', c1}
[PROOF STEP]
by (rule ideal_generated_singleton_subset, auto)
[PROOF STATE]
proof (state)
this:
ideal_generated {1::'a} \<subseteq> ideal_generated {a1 * a1', b1 * a1', c1}

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
ideal_generated {1::'a} \<subseteq> ideal_generated {a1 * a1', b1 * a1', c1}

goal (1 subgoal):
 1. ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
using r1 r2 i4 c
[PROOF STATE]
proof (prove)
using this:
a = a1 * a1' * d
b = b1 * a1' * d
ideal_generated {a1 * a1', b1 * a1', c1} = ideal_generated {1::'a}
c = c1 * d

goal (1 subgoal):
 1. \<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>a1 b1 c1. a = a1 * d \<and> b = b1 * d \<and> c = c1 * d \<and> ideal_generated {a1, b1, c1} = ideal_generated {1::'a}

goal:
No subgoals!
[PROOF STEP]
qed