[STATEMENT]
lemma hd_drop_conv_nth: "n < length xs \<Longrightarrow> hd(drop n xs) = xs!n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < length xs \<Longrightarrow> hd (drop n xs) = xs ! n
[PROOF STEP]
by(simp add: hd_conv_nth)


[STATEMENT]
lemma length_xor_list [simp]: "length (xor_list xs ys) = min (length xs) (length ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (xs [\<oplus>] ys) = min (length xs) (length ys)
[PROOF STEP]
by(simp add: xor_list_def)


[STATEMENT]
lemma pverts_mk_symmetric[simp]: "pverts (mk_symmetric G) = verts G"
  and parcs_mk_symmetric:
    "parcs (mk_symmetric G) = (\<Union>e\<in>arcs G. {(tail G e, head G e), (head G e, tail G e)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pverts (mk_symmetric G) = verts G &&& parcs (mk_symmetric G) = (\<Union>e\<in>arcs G. {(tail G e, head G e), (head G e, tail G e)})
[PROOF STEP]
by (auto simp: mk_symmetric_def arcs_ends_conv image_UN)


[STATEMENT]
lemma lookup_minus_fun: "lookup (s - t) = lookup s - lookup t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup (s - t) = lookup s - lookup t
[PROOF STEP]
by (simp only: minus_poly_mapping.rep_eq, rule, simp only: minus_apply)


[STATEMENT]
lemma
  iTILL_Max: "Max [\<dots>n] = n" and
  iIN_Max: "Max [n\<dots>,d] = n+d" and
  iMODb_Max: "Max [r, mod m, c] = r + m * c" and
  iMOD_0_Max: "Max [r, mod 0] = r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Max [\<dots>n] = n &&& Max [n\<dots>,d] = n + d) &&& Max [ r, mod m, c ] = r + m * c &&& Max [ r, mod 0 ] = r
[PROOF STEP]
by (rule Max_equality, (simp add: iT_iff iT_finite)+)+


[STATEMENT]
lemma register_from_getter_setter_compatibleI[intro]:
  assumes [simp]: \<open>valid_getter_setter g s\<close> \<open>valid_getter_setter g' s'\<close>
  assumes \<open>\<And>x y m. s x (s' y m) = s' y (s x m)\<close>
  shows \<open>compatible (register_from_getter_setter g s) (register_from_getter_setter g' s')\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compatible (register_from_getter_setter g s) (register_from_getter_setter g' s')
[PROOF STEP]
apply (subst compatible_setter)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. register (register_from_getter_setter g s)
 2. register (register_from_getter_setter g' s')
 3. \<forall>a b. setter (register_from_getter_setter g s) a \<circ> setter (register_from_getter_setter g' s') b = setter (register_from_getter_setter g' s') b \<circ> setter (register_from_getter_setter g s) a
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
valid_getter_setter g s
valid_getter_setter g' s'
s ?x (s' ?y ?m) = s' ?y (s ?x ?m)

goal (3 subgoals):
 1. register (register_from_getter_setter g s)
 2. register (register_from_getter_setter g' s')
 3. \<forall>a b. setter (register_from_getter_setter g s) a \<circ> setter (register_from_getter_setter g' s') b = setter (register_from_getter_setter g' s') b \<circ> setter (register_from_getter_setter g s) a
[PROOF STEP]
by auto


[STATEMENT]
lemma moebius_pt_moebius_rotation_inf [simp]:
  shows "moebius_pt (moebius_rotation v) \<infinity>\<^sub>h = \<infinity>\<^sub>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (moebius_rotation v) \<infinity>\<^sub>h = \<infinity>\<^sub>h
[PROOF STEP]
unfolding moebius_rotation_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (moebius_similarity (cis v) 0) \<infinity>\<^sub>h = \<infinity>\<^sub>h
[PROOF STEP]
by simp


[STATEMENT]
lemma SUP_spmf_neq_top': "(SUP p\<in>Y. ennreal (spmf p x)) \<noteq> \<top>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>p\<in>Y. ennreal (spmf p x)) \<noteq> \<top>
[PROOF STEP]
proof(rule neq_top_trans)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?y \<noteq> \<top>
 2. (\<Squnion>p\<in>Y. ennreal (spmf p x)) \<le> ?y
[PROOF STEP]
show "(SUP p\<in>Y. ennreal (spmf p x)) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>p\<in>Y. ennreal (spmf p x)) \<le> 1
[PROOF STEP]
by(rule SUP_least)(simp add: pmf_le_1)
[PROOF STATE]
proof (state)
this:
(\<Squnion>p\<in>Y. ennreal (spmf p x)) \<le> 1

goal (1 subgoal):
 1. 1 \<noteq> \<top>
[PROOF STEP]
qed simp


[STATEMENT]
lemma set_eqE:
  fixes R (structure)
  assumes "A {.=} B"
    and "\<lbrakk> \<forall>a \<in> A. a .\<in> B; \<forall>b \<in> B. b .\<in> A \<rbrakk> \<Longrightarrow> P"
  shows "P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A {.=} B
\<lbrakk>\<forall>a\<in>A. a .\<in> B; \<forall>b\<in>B. b .\<in> A\<rbrakk> \<Longrightarrow> P

goal (1 subgoal):
 1. P
[PROOF STEP]
unfolding set_eq_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>A. x .\<in> B) \<and> (\<forall>x\<in>B. x .\<in> A)
\<lbrakk>\<forall>a\<in>A. a .\<in> B; \<forall>b\<in>B. b .\<in> A\<rbrakk> \<Longrightarrow> P

goal (1 subgoal):
 1. P
[PROOF STEP]
by blast


[STATEMENT]
lemma neg_le_divideR_eq [field_simps]:
  "a \<le> b /\<^sub>R c \<longleftrightarrow> b \<le> c *\<^sub>R a" (is "?P \<longleftrightarrow> ?Q") if "c < 0"
    for a b :: "'a :: ordered_real_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<le> b /\<^sub>R c) = (b \<le> c *\<^sub>R a)
[PROOF STEP]
using that pos_le_divideR_eq [of "- c" a "- b"]
[PROOF STATE]
proof (prove)
using this:
c < 0
0 < - c \<Longrightarrow> (a \<le> - b /\<^sub>R - c) = (- c *\<^sub>R a \<le> - b)

goal (1 subgoal):
 1. (a \<le> b /\<^sub>R c) = (b \<le> c *\<^sub>R a)
[PROOF STEP]
by simp


[STATEMENT]
lemma compute_float_down[code]:
  "float_down p (Float m e) =
    (if p + e < 0 then Float (div_twopow m (nat (-(p + e)))) (-p) else Float m e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
proof (cases "p + e < 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
 2. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p + e < 0

goal (2 subgoals):
 1. p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
 2. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p + e < 0
[PROOF STEP]
have "real_of_int ((2::int) ^ nat (-(p + e))) = 2 powr (-(p + e))"
[PROOF STATE]
proof (prove)
using this:
p + e < 0

goal (1 subgoal):
 1. real_of_int (2 ^ nat (- (p + e))) = 2 powr real_of_int (- (p + e))
[PROOF STEP]
using powr_realpow[of 2 "nat (-(p + e))"]
[PROOF STATE]
proof (prove)
using this:
p + e < 0
0 < 2 \<Longrightarrow> 2 powr real (nat (- (p + e))) = 2 ^ nat (- (p + e))

goal (1 subgoal):
 1. real_of_int (2 ^ nat (- (p + e))) = 2 powr real_of_int (- (p + e))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real_of_int (2 ^ nat (- (p + e))) = 2 powr real_of_int (- (p + e))

goal (2 subgoals):
 1. p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
 2. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real_of_int (2 ^ nat (- (p + e))) = 2 powr real_of_int (- (p + e))

goal (2 subgoals):
 1. p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
 2. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
have "\<dots> = 1 / 2 powr p / 2 powr e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 powr real_of_int (- (p + e)) = 1 / 2 powr real_of_int p / 2 powr real_of_int e
[PROOF STEP]
unfolding powr_minus_divide of_int_minus
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 powr real_of_int (p + e) = 1 / 2 powr real_of_int p / 2 powr real_of_int e
[PROOF STEP]
by (simp add: powr_add)
[PROOF STATE]
proof (state)
this:
2 powr real_of_int (- (p + e)) = 1 / 2 powr real_of_int p / 2 powr real_of_int e

goal (2 subgoals):
 1. p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
 2. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real_of_int (2 ^ nat (- (p + e))) = 1 / 2 powr real_of_int p / 2 powr real_of_int e
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real_of_int (2 ^ nat (- (p + e))) = 1 / 2 powr real_of_int p / 2 powr real_of_int e

goal (1 subgoal):
 1. float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
using \<open>p + e < 0\<close>
[PROOF STATE]
proof (prove)
using this:
real_of_int (2 ^ nat (- (p + e))) = 1 / 2 powr real_of_int p / 2 powr real_of_int e
p + e < 0

goal (1 subgoal):
 1. float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>p e m. \<lbrakk>real_of_int (2 ^ nat (- (p + e))) = 1 / 2 powr real_of_int p / 2 powr real_of_int e; p + e < 0\<rbrakk> \<Longrightarrow> round_down p (real_of_int m * 2 powr real_of_int e) = (if p + e < 0 then real_of_int (div_twopow m (nat (- (p + e)))) * 2 powr real_of_int (- p) else real_of_int m * 2 powr real_of_int e)
[PROOF STEP]
apply (simp add: round_down_def field_simps flip: floor_divide_of_int_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>p e m. \<lbrakk>2 powr real_of_int p * (2 powr real_of_int e * 2 ^ nat (- p - e)) = 1; p + e < 0\<rbrakk> \<Longrightarrow> \<lfloor>real_of_int m * (2 powr real_of_int p * 2 powr real_of_int e)\<rfloor> = m div 2 ^ nat (- p - e)
[PROOF STEP]
apply (metis (no_types, opaque_lifting) Float.rep_eq
      add.inverse_inverse compute_real_of_float diff_minus_eq_add
      floor_divide_of_int_eq int_of_reals(1) linorder_not_le
      minus_add_distrib of_int_eq_numeral_power_cancel_iff powr_add)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)

goal (1 subgoal):
 1. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> p + e < 0

goal (1 subgoal):
 1. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> p + e < 0
[PROOF STEP]
have r: "real_of_int e + real_of_int p = real (nat (e + p))"
[PROOF STATE]
proof (prove)
using this:
\<not> p + e < 0

goal (1 subgoal):
 1. real_of_int e + real_of_int p = real (nat (e + p))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real_of_int e + real_of_int p = real (nat (e + p))

goal (1 subgoal):
 1. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
have r: "\<lfloor>(m * 2 powr e) * 2 powr real_of_int p\<rfloor> = (m * 2 powr e) * 2 powr real_of_int p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int \<lfloor>real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p\<rfloor> = real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p
[PROOF STEP]
by (auto intro: exI[where x="m*2^nat (e+p)"]
        simp add: ac_simps powr_add[symmetric] r powr_realpow)
[PROOF STATE]
proof (state)
this:
real_of_int \<lfloor>real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p\<rfloor> = real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p

goal (1 subgoal):
 1. \<not> p + e < 0 \<Longrightarrow> float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
with \<open>\<not> p + e < 0\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> p + e < 0
real_of_int \<lfloor>real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p\<rfloor> = real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> p + e < 0
real_of_int \<lfloor>real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p\<rfloor> = real_of_int m * 2 powr real_of_int e * 2 powr real_of_int p

goal (1 subgoal):
 1. float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)
[PROOF STEP]
by transfer (auto simp add: round_down_def field_simps powr_add powr_minus)
[PROOF STATE]
proof (state)
this:
float_down p (Float m e) = (if p + e < 0 then Float (div_twopow m (nat (- (p + e)))) (- p) else Float m e)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Dom_fun_eq_set:
  assumes
    "Domainp A = (\<lambda>x. x \<in> \<UU>A)" "bi_unique A" "right_total A"
    "Domainp B = (\<lambda>x. x \<in> \<UU>B)" "bi_unique B" "right_total B"
  shows "{f. f ` \<UU>A \<subseteq> \<UU>B} = Collect (Domainp (A ===> B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {f. f ` \<UU>A \<subseteq> \<UU>B} = Collect (Domainp (A ===> B))
[PROOF STEP]
proof(standard; (standard, intro CollectI, elim CollectE DomainpE))
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x ` \<UU>A \<subseteq> \<UU>B \<Longrightarrow> Domainp (A ===> B) x
 2. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x ` \<UU>A \<subseteq> \<UU>B \<Longrightarrow> Domainp (A ===> B) x
 2. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
assume "x ` \<UU>A \<subseteq> \<UU>B"
[PROOF STATE]
proof (state)
this:
x ` \<UU>A \<subseteq> \<UU>B

goal (2 subgoals):
 1. \<And>x. x ` \<UU>A \<subseteq> \<UU>B \<Longrightarrow> Domainp (A ===> B) x
 2. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
from tts_AB_transfer[OF this assms]
[PROOF STATE]
proof (chain)
picking this:
\<exists>rcdt. (A ===> B) x rcdt
[PROOF STEP]
obtain x' where xx':
    "(A ===> B) x x'"
[PROOF STATE]
proof (prove)
using this:
\<exists>rcdt. (A ===> B) x rcdt

goal (1 subgoal):
 1. (\<And>x'. (A ===> B) x x' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by clarsimp
[PROOF STATE]
proof (state)
this:
(A ===> B) x x'

goal (2 subgoals):
 1. \<And>x. x ` \<UU>A \<subseteq> \<UU>B \<Longrightarrow> Domainp (A ===> B) x
 2. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
show "Domainp (A ===> B) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Domainp (A ===> B) x
[PROOF STEP]
by standard (rule xx')
[PROOF STATE]
proof (state)
this:
Domainp (A ===> B) x

goal (1 subgoal):
 1. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
fix x b
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
assume "(A ===> B) x b"
[PROOF STATE]
proof (state)
this:
(A ===> B) x b

goal (1 subgoal):
 1. \<And>x b. (A ===> B) x b \<Longrightarrow> x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(A ===> B) x b
[PROOF STEP]
show "x ` \<UU>A \<subseteq> \<UU>B"
[PROOF STATE]
proof (prove)
using this:
(A ===> B) x b

goal (1 subgoal):
 1. x ` \<UU>A \<subseteq> \<UU>B
[PROOF STEP]
unfolding
      rel_fun_def
      Domainp_eq_Collect[THEN iffD1, OF assms(1)]
      Domainp_eq_Collect[THEN iffD1, OF assms(4)]
[PROOF STATE]
proof (prove)
using this:
\<forall>xa y. A xa y \<longrightarrow> B (x xa) (b y)

goal (1 subgoal):
 1. x ` Collect (Domainp A) \<subseteq> Collect (Domainp B)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x ` \<UU>A \<subseteq> \<UU>B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma of_real_harm: "of_real (harm n) = harm n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_real (harm n) = harm n
[PROOF STEP]
unfolding harm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_real (\<Sum>k = 1..n. inverse (real k)) = (\<Sum>k = 1..n. inverse (of_nat k))
[PROOF STEP]
by simp


[STATEMENT]
lemma filter_eq_replicate_mset: "{#y \<in># D. y = x#} = replicate_mset (count D x) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {#y \<in># D. y = x#} = replicate_mset (count D x) x
[PROOF STEP]
by (induct D) simp_all


[STATEMENT]
lemma more_one [simp]: "more 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. more 1 = (1::'a)
[PROOF STEP]
by (simp add: one_Quantity_ext_def)


[STATEMENT]
lemma changing_atoms_works:
  "(\<And>x. P x \<Longrightarrow> (f o g) x = x) \<Longrightarrow> (\<forall>x\<in>atoms phi. P x) \<Longrightarrow> M \<Turnstile> phi \<longleftrightarrow> M o f \<Turnstile> map_formula g phi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. P x \<Longrightarrow> (f \<circ> g) x = x; \<forall>x\<in>atoms phi. P x\<rbrakk> \<Longrightarrow> M \<Turnstile> phi = M \<circ> f \<Turnstile> map_formula g phi
[PROOF STEP]
by (induction phi) auto


[STATEMENT]
lemma ub: "(\<Sum>i<n. T (f i) (state f i)) \<le> (\<Sum>i<n. U (f i) (state f i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<n. T (f i) (state f i)) \<le> (\<Sum>i<n. U (f i) (state f i))
[PROOF STEP]
by (metis (mono_tags) aa1 order.trans sum_mono TA)


[STATEMENT]
lemma invertible_Hermite_of_list_of_rows_cancelled_first:
  "\<exists>Rep Abs. type_definition Rep Abs {0..<int n}
  \<Longrightarrow> 1 < m \<Longrightarrow> 1 < n \<Longrightarrow> A \<in> carrier_mat m n \<Longrightarrow> echelon_form_JNF A
  \<Longrightarrow> \<exists>P. P \<in> carrier_mat m m \<and> invertible_mat P \<and> Hermite_of_list_of_rows A [0..<m] = P * A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>Rep Abs. type_definition Rep Abs {0..<int n}; 1 < m; 1 < n; A \<in> carrier_mat m n; echelon_form_JNF A\<rbrakk> \<Longrightarrow> \<exists>P. P \<in> carrier_mat m m \<and> invertible_mat P \<and> Hermite_of_list_of_rows A [0..<m] = P * A
[PROOF STEP]
using invertible_Hermite_of_list_of_rows_nontriv_mod_ring_aux[cancel_type_definition, of m n A]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>{0..<int m} \<noteq> {}; \<exists>Rep Abs. type_definition Rep Abs {0..<int n}; 1 < m; 1 < n; A \<in> carrier_mat m n; echelon_form_JNF A\<rbrakk> \<Longrightarrow> \<exists>P. P \<in> carrier_mat m m \<and> invertible_mat P \<and> Hermite_of_list_of_rows A [0..<m] = P * A

goal (1 subgoal):
 1. \<lbrakk>\<exists>Rep Abs. type_definition Rep Abs {0..<int n}; 1 < m; 1 < n; A \<in> carrier_mat m n; echelon_form_JNF A\<rbrakk> \<Longrightarrow> \<exists>P. P \<in> carrier_mat m m \<and> invertible_mat P \<and> Hermite_of_list_of_rows A [0..<m] = P * A
[PROOF STEP]
by auto


[STATEMENT]
lemma rot_y_ivl:
  assumes "(0::real) \<le> x" "x \<le> 1" "0 \<le> y" "y \<le> 1"
  shows "0 \<le> rot_y'' x y \<and> rot_y'' x y \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<and> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
show "0 \<le> rot_y'' x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
proof(cases "(x_coord x) < 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x_coord x < 0

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
have i: "\<And>a b::real. a < 0 \<Longrightarrow> 0 \<le> a + b \<Longrightarrow> (0 \<le> a/(2*(b)) + 1/2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a < 0; 0 \<le> a + b\<rbrakk> \<Longrightarrow> 0 \<le> a / (2 * b) + 1 / 2
[PROOF STEP]
by(auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a < 0; 0 \<le> ?a + ?b\<rbrakk> \<Longrightarrow> 0 \<le> ?a / (2 * ?b) + 1 / 2

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
have *: "(1/2 - x) \<le> sqrt (x * x + (1/4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 - x \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
[PROOF STEP]
apply (rule real_le_rsqrt)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 / 2 - x)\<^sup>2 \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. (1 / 2 - x)\<^sup>2 \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
[PROOF STEP]
apply (simp add: algebra_simps power2_eq_square mult_left_le_one_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> x; x \<le> 1; 0 \<le> y; y \<le> 1\<rbrakk> \<Longrightarrow> x * (x * (y * 4)) + x * (y * (y * 4)) \<le> x * (y * 4) + x * (x * (y * (y * 4)))
[PROOF STEP]
by (sos "(((A<0 * R<1) + ((A<=0 * (A<=1 * (A<=2 * (A<=3 * R<1)))) * (R<4 * [1]^2))))")
[PROOF STATE]
proof (state)
this:
1 / 2 - x \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
have rw: "\<bar>x - x * x\<bar> = x - x * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x - x * x\<bar> = x - x * x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<bar>x - x * x\<bar> = x - x * x
[PROOF STEP]
by (sos "(() & (((((A<0 * A<1) * R<1) + ((A<=0 * (A<=1 * (A<1 * R<1))) * (R<1 * [1]^2)))) & ((((A<0 * A<1) * R<1) + ((A<=0 * (A<=1 * (A<1 * R<1))) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<bar>x - x * x\<bar> = x - x * x

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
have "0 \<le> x_coord x + (circle_y (x_coord (rot_x'' x y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x_coord x + circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
1 / 2 - x \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (1 subgoal):
 1. 0 \<le> x_coord x + circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
apply (auto simp add: x_coord_inv_2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 - x \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))) \<Longrightarrow> 0 \<le> x_coord x + circle_y ((2 * y - 1) * circle_y (x_coord x))
[PROOF STEP]
by (auto simp add: circle_y_def algebra_simps rw x_coord_def)
[PROOF STATE]
proof (state)
this:
0 \<le> x_coord x + circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
 2. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x_coord x + circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> x_coord x + circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (1 subgoal):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
using True i
[PROOF STATE]
proof (prove)
using this:
0 \<le> x_coord x + circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
x_coord x < 0
\<lbrakk>?a < 0; 0 \<le> ?a + ?b\<rbrakk> \<Longrightarrow> 0 \<le> ?a / (2 * ?b) + 1 / 2

goal (1 subgoal):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> x_coord x < 0

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
have i: "\<And>a b::real. 0 \<le> a \<Longrightarrow> 0 \<le> b  \<Longrightarrow> (0 \<le> a/(2*b) + 1/2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>0 \<le> a; 0 \<le> b\<rbrakk> \<Longrightarrow> 0 \<le> a / (2 * b) + 1 / 2
[PROOF STEP]
by(auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?a; 0 \<le> ?b\<rbrakk> \<Longrightarrow> 0 \<le> ?a / (2 * ?b) + 1 / 2

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
have "0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
have rw: "\<bar>x - x * x\<bar> = x - x * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x - x * x\<bar> = x - x * x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<bar>x - x * x\<bar> = x - x * x
[PROOF STEP]
by (sos "(() & (((((A<0 * A<1) * R<1) + ((A<=0 * (A<=1 * (A<1 * R<1))) * (R<1 * [1]^2)))) & ((((A<0 * A<1) * R<1) + ((A<=0 * (A<=1 * (A<1 * R<1))) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<bar>x - x * x\<bar> = x - x * x

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
have "\<And>x. 0 \<le> x \<Longrightarrow> x \<le> 1/2 \<Longrightarrow> -1/2\<le> (2 * y - 1) * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * x
[PROOF STEP]
by (sos "(((A<0 * R<1) + (((A<=4 * R<1) * (R<1/2 * [1]^2)) + (((A<=1 * (A<=5 * R<1)) * (R<1 * [1]^2)) + ((A<=0 * (A<=4 * R<1)) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x
[PROOF STEP]
have "- 1/2 \<le> (2 * y - 1) * circle_y (x_coord x)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x

goal (1 subgoal):
 1. - 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
[PROOF STEP]
using circle_y_x_coord_bounds assms(1-2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x
\<lbrakk>0 \<le> ?x; ?x \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> circle_y (x_coord ?x) \<and> circle_y (x_coord ?x) \<le> 1 / 2
0 \<le> x
x \<le> 1

goal (1 subgoal):
 1. - 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
have "\<And>x. 0 \<le> x \<Longrightarrow> x \<le> 1/2 \<Longrightarrow> (2 * y - 1) * x \<le> 1/2 "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * x \<le> 1 / 2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * x \<le> 1 / 2
[PROOF STEP]
by (sos "(((A<0 * R<1) + (((A<=5 * R<1) * (R<1/2 * [1]^2)) + (((A<=1 * (A<=4 * R<1)) * (R<1 * [1]^2)) + ((A<=0 * (A<=5 * R<1)) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2
[PROOF STEP]
have "(2 * y - 1) * circle_y (x_coord x) \<le> 1/2"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2

goal (1 subgoal):
 1. (2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2
[PROOF STEP]
using circle_y_x_coord_bounds assms(1-2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2
\<lbrakk>0 \<le> ?x; ?x \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> circle_y (x_coord ?x) \<and> circle_y (x_coord ?x) \<le> 1 / 2
0 \<le> x
x \<le> 1

goal (1 subgoal):
 1. (2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
(2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2
[PROOF STEP]
show "0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))"
[PROOF STATE]
proof (prove)
using this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
(2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
by (simp add: circle_y_bounds(1) x_coord_inv_2)
[PROOF STATE]
proof (state)
this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (1 subgoal):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
\<not> x_coord x < 0

goal (1 subgoal):
 1. 0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 \<le> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2

goal (1 subgoal):
 1. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have i: "\<And>a b::real. a < 0 \<Longrightarrow> 0 \<le> b \<Longrightarrow> (a/(2*(b)) + 1/2) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a < 0; 0 \<le> b\<rbrakk> \<Longrightarrow> a / (2 * b) + 1 / 2 \<le> 1
[PROOF STEP]
by(auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a < 0; 0 \<le> ?b\<rbrakk> \<Longrightarrow> ?a / (2 * ?b) + 1 / 2 \<le> 1

goal (1 subgoal):
 1. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
show "rot_y'' x y \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
proof(cases "(x_coord x) < 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x_coord x < 0

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have i: "\<And>a b::real. a < 0 \<Longrightarrow> 0 \<le> b \<Longrightarrow> (a/(2*(b)) + 1/2) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a < 0; 0 \<le> b\<rbrakk> \<Longrightarrow> a / (2 * b) + 1 / 2 \<le> 1
[PROOF STEP]
by(auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a < 0; 0 \<le> ?b\<rbrakk> \<Longrightarrow> ?a / (2 * ?b) + 1 / 2 \<le> 1

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have "\<And>x. 0 \<le> x \<Longrightarrow> x \<le> 1/2 \<Longrightarrow> -1/2\<le> (2 * y - 1) * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * x
[PROOF STEP]
by (sos "(((A<0 * R<1) + (((A<=4 * R<1) * (R<1/2 * [1]^2)) + (((A<=1 * (A<=5 * R<1)) * (R<1 * [1]^2)) + ((A<=0 * (A<=4 * R<1)) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x
[PROOF STEP]
have "- 1/2 \<le> (2 * y - 1) * circle_y (x_coord x)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x

goal (1 subgoal):
 1. - 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
[PROOF STEP]
using circle_y_x_coord_bounds assms(1-2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> - 1 / 2 \<le> (2 * y - 1) * ?x
\<lbrakk>0 \<le> ?x; ?x \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> circle_y (x_coord ?x) \<and> circle_y (x_coord ?x) \<le> 1 / 2
0 \<le> x
x \<le> 1

goal (1 subgoal):
 1. - 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have "\<And>x. 0 \<le> x \<Longrightarrow> x \<le> 1/2 \<Longrightarrow> (2 * y - 1) * x \<le> 1/2 "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * x \<le> 1 / 2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<And>x. \<lbrakk>0 \<le> x; x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * x \<le> 1 / 2
[PROOF STEP]
by (sos "(((A<0 * R<1) + (((A<=5 * R<1) * (R<1/2 * [1]^2)) + (((A<=1 * (A<=4 * R<1)) * (R<1 * [1]^2)) + ((A<=0 * (A<=5 * R<1)) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2
[PROOF STEP]
have "(2 * y - 1) * circle_y (x_coord x) \<le> 1/2"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2

goal (1 subgoal):
 1. (2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2
[PROOF STEP]
using circle_y_x_coord_bounds assms(1-2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?x; ?x \<le> 1 / 2\<rbrakk> \<Longrightarrow> (2 * y - 1) * ?x \<le> 1 / 2
\<lbrakk>0 \<le> ?x; ?x \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> circle_y (x_coord ?x) \<and> circle_y (x_coord ?x) \<le> 1 / 2
0 \<le> x
x \<le> 1

goal (1 subgoal):
 1. (2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
(2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2
[PROOF STEP]
have "0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))"
[PROOF STATE]
proof (prove)
using this:
- 1 / 2 \<le> (2 * y - 1) * circle_y (x_coord x)
(2 * y - 1) * circle_y (x_coord x) \<le> 1 / 2

goal (1 subgoal):
 1. 0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
by (simp add: circle_y_bounds(1) x_coord_inv_2)
[PROOF STATE]
proof (state)
this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (2 subgoals):
 1. x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
 2. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (1 subgoal):
 1. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
by (simp add: True i)
[PROOF STATE]
proof (state)
this:
x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> x_coord x < 0

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have i: "\<And>a b::real. 0 \<le> a \<Longrightarrow> a \<le> b  \<Longrightarrow> (a/(2*b) + 1/2) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>0 \<le> a; a \<le> b\<rbrakk> \<Longrightarrow> a / (2 * b) + 1 / 2 \<le> 1
[PROOF STEP]
by(auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?a; ?a \<le> ?b\<rbrakk> \<Longrightarrow> ?a / (2 * ?b) + 1 / 2 \<le> 1

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have "(x - 1/2) * (x - 1/2) \<le> (x * x + (1/4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
[PROOF STEP]
using assms False
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1
\<not> x_coord x < 0

goal (1 subgoal):
 1. (x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
[PROOF STEP]
apply(auto simp add: x_coord_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<le> 1; 0 \<le> y; y \<le> 1; \<not> x * 2 < 1\<rbrakk> \<Longrightarrow> (x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
[PROOF STEP]
by (sos "(((A<0 * R<1) + (((A<=0 * (A<=1 * (A<=2 * R<1))) * (R<2 * [1]^2)) + ((A<=0 * (A<=1 * (A<=2 * (A<=3 * R<1)))) * (R<2 * [1]^2)))))")
[PROOF STATE]
proof (state)
this:
(x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
[PROOF STEP]
have "sqrt ((x - 1/2) * (x - 1/2)) \<le> sqrt (x * x + (1/4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))"
[PROOF STATE]
proof (prove)
using this:
(x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))

goal (1 subgoal):
 1. sqrt ((x - 1 / 2) * (x - 1 / 2)) \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
[PROOF STEP]
using real_sqrt_le_mono
[PROOF STATE]
proof (prove)
using this:
(x - 1 / 2) * (x - 1 / 2) \<le> x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4))))
?x \<le> ?y \<Longrightarrow> sqrt ?x \<le> sqrt ?y

goal (1 subgoal):
 1. sqrt ((x - 1 / 2) * (x - 1 / 2)) \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sqrt ((x - 1 / 2) * (x - 1 / 2)) \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sqrt ((x - 1 / 2) * (x - 1 / 2)) \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
[PROOF STEP]
have *: "(x - 1/2) \<le> sqrt (x * x + (1/4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))"
[PROOF STATE]
proof (prove)
using this:
sqrt ((x - 1 / 2) * (x - 1 / 2)) \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (1 subgoal):
 1. x - 1 / 2 \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
[PROOF STEP]
using assms False
[PROOF STATE]
proof (prove)
using this:
sqrt ((x - 1 / 2) * (x - 1 / 2)) \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1
\<not> x_coord x < 0

goal (1 subgoal):
 1. x - 1 / 2 \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))
[PROOF STEP]
by(auto simp add: x_coord_def)
[PROOF STATE]
proof (state)
this:
x - 1 / 2 \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have rw: "\<bar>x - x * x\<bar> = x - x * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x - x * x\<bar> = x - x * x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1
0 \<le> y
y \<le> 1

goal (1 subgoal):
 1. \<bar>x - x * x\<bar> = x - x * x
[PROOF STEP]
by (sos "(() & (((((A<0 * A<1) * R<1) + ((A<=0 * (A<=1 * (A<1 * R<1))) * (R<1 * [1]^2)))) & ((((A<0 * A<1) * R<1) + ((A<=0 * (A<=1 * (A<1 * R<1))) * (R<1 * [1]^2))))))")
[PROOF STATE]
proof (state)
this:
\<bar>x - x * x\<bar> = x - x * x

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
have "x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
x - 1 / 2 \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (1 subgoal):
 1. x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
unfolding x_coord_inv_2
[PROOF STATE]
proof (prove)
using this:
x - 1 / 2 \<le> sqrt (x * x + (1 / 4 + (x * (y * 4) + x * (x * (y * (y * 4))))) - (x + (x * (x * (y * 4)) + x * (y * (y * 4)))))

goal (1 subgoal):
 1. x_coord x \<le> circle_y ((2 * y - 1) * circle_y (x_coord x))
[PROOF STEP]
by (auto simp add: circle_y_def algebra_simps rw x_coord_def)
[PROOF STATE]
proof (state)
this:
x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (1 subgoal):
 1. \<not> x_coord x < 0 \<Longrightarrow> x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))

goal (1 subgoal):
 1. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
using False i
[PROOF STATE]
proof (prove)
using this:
x_coord x \<le> circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))
\<not> x_coord x < 0
\<lbrakk>0 \<le> ?a; ?a \<le> ?b\<rbrakk> \<Longrightarrow> ?a / (2 * ?b) + 1 / 2 \<le> 1

goal (1 subgoal):
 1. x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x_coord x / (2 * circle_y (x_coord (x_coord_inv ((2 * y - 1) * circle_y (x_coord x))))) + 1 / 2 \<le> 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tendsto_matrix_vector_mult[tendsto_intros]:
  "((*v) (A :: 'a :: real_normed_algebra_1 ^ 'n ^ 'k) \<longlongrightarrow> A *v v) (at v within S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((*v) A \<longlongrightarrow> A *v v) (at v within S)
[PROOF STEP]
unfolding matrix_vector_mult_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. \<Sum>j\<in>UNIV. A $h i $h j * x $h j) \<longlongrightarrow> (\<chi>i. \<Sum>j\<in>UNIV. A $h i $h j * v $h j)) (at v within S)
[PROOF STEP]
by (auto intro!: tendsto_intros)


[STATEMENT]
lemma set_neg_intro2: "a \<in> C \<Longrightarrow> - a \<in> (- 1) *o C"
  for a :: "'a::ring_1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> C \<Longrightarrow> - a \<in> - (1::'a) *o C
[PROOF STEP]
by (auto simp add: elt_set_times_def)


[STATEMENT]
lemma no_defection_def:
  "no_defection s round_votes r =
    (\<forall>r' < r. \<forall>a Q v. quorum_for Q v (votes s r') \<and> a \<in> Q \<longrightarrow> round_votes a \<in> {None, Some v})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. no_defection s round_votes r = (\<forall>r'<r. \<forall>a Q v. quorum_for Q v (votes s r') \<and> a \<in> Q \<longrightarrow> round_votes a \<in> {None, Some v})
[PROOF STEP]
apply(auto simp add: no_defection_def' Ball_def quorum_for_def')
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>r' a Q v. \<lbrakk>\<forall>r'<r. \<forall>x. x \<in> Quorum \<longrightarrow> (\<forall>v. votes s r' ` x = {Some v} \<longrightarrow> round_votes ` x \<subseteq> {None, Some v}); r' < r; Q \<in> Quorum; votes s r' ` Q = {Some v}; a \<in> Q; round_votes a \<noteq> Some v\<rbrakk> \<Longrightarrow> round_votes a = None
 2. \<And>r' x v xb y. \<lbrakk>\<forall>r'<r. \<forall>a Q v. Q \<in> Quorum \<and> votes s r' ` Q = {Some v} \<and> a \<in> Q \<longrightarrow> round_votes a = None \<or> round_votes a = Some v; r' < r; x \<in> Quorum; votes s r' ` x = {Some v}; xb \<in> x; round_votes xb = Some y\<rbrakk> \<Longrightarrow> y = v
[PROOF STEP]
apply(blast)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r' x v xb y. \<lbrakk>\<forall>r'<r. \<forall>a Q v. Q \<in> Quorum \<and> votes s r' ` Q = {Some v} \<and> a \<in> Q \<longrightarrow> round_votes a = None \<or> round_votes a = Some v; r' < r; x \<in> Quorum; votes s r' ` x = {Some v}; xb \<in> x; round_votes xb = Some y\<rbrakk> \<Longrightarrow> y = v
[PROOF STEP]
by (metis option.discI option.inject)


[STATEMENT]
lemma omega_star:
  "(x\<^sup>\<omega>)\<^sup>\<star> = 1 \<squnion> x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<omega>\<^sup>\<star> = (1::'a) \<squnion> x\<^sup>\<omega>
[PROOF STEP]
by (metis antisym_conv star.circ_mult_increasing star_left_unfold_equal omega_sub_vector)


[STATEMENT]
lemma Infinitesimal_add_hrabs_hypreal_of_real_less:
  "x \<in> Infinitesimal \<Longrightarrow> \<bar>hypreal_of_real r\<bar> < hypreal_of_real y \<Longrightarrow>
    \<bar>hypreal_of_real r + x\<bar> < hypreal_of_real y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> Infinitesimal; \<bar>hypreal_of_real r\<bar> < hypreal_of_real y\<rbrakk> \<Longrightarrow> \<bar>hypreal_of_real r + x\<bar> < hypreal_of_real y
[PROOF STEP]
by (metis Infinitesimal_add_hypreal_of_real_less approx_hrabs_add_Infinitesimal approx_sym bex_Infinitesimal_iff2 star_of_abs star_of_less)


[STATEMENT]
lemma two_phase_step: "(two_phase r * 2) + two_step r = r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. two_phase r * 2 + two_step r = r
[PROOF STEP]
by (auto simp add: two_phase_def two_step_def)


[STATEMENT]
lemma PiE_Int: "Pi\<^sub>E I A \<inter> Pi\<^sub>E I B = Pi\<^sub>E I (\<lambda>x. A x \<inter> B x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi\<^sub>E I A \<inter> Pi\<^sub>E I B = (\<Pi>\<^sub>E x\<in>I. A x \<inter> B x)
[PROOF STEP]
by (auto simp: PiE_def)


[STATEMENT]
lemma max_0_imp_0[simp]:
"(max x y = (0::nat)) = (x = 0 \<and> y = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (max x y = 0) = (x = 0 \<and> y = 0)
[PROOF STEP]
by auto


[STATEMENT]
lemma card_agents [simp]: "card agents = 4" and card_alts [simp]: "card alts = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card agents = 4 &&& card alts = 4
[PROOF STEP]
using distinct_agents distinct_alts
[PROOF STATE]
proof (prove)
using this:
distinct [A1, A2, A3, A4]
distinct [a, b, c, d]

goal (1 subgoal):
 1. card agents = 4 &&& card alts = 4
[PROOF STEP]
by (simp_all add: agents alts)


[STATEMENT]
lemma plgs__coplanar:
  assumes "ParallelogramStrict A B C D"
  shows "Coplanar A B C D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
using ParallelogramStrict_def assms par__coplanar
[PROOF STATE]
proof (prove)
using this:
ParallelogramStrict ?A ?B ?A' ?B' \<equiv> ?A ?A' TS ?B ?B' \<and> ?A ?B Par ?A' ?B' \<and> Cong ?A ?B ?A' ?B'
ParallelogramStrict A B C D
?A ?B Par ?C ?D \<Longrightarrow> Coplanar ?A ?B ?C ?D

goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
by blast


[STATEMENT]
lemma le_opt_trans [rule_format]:
  "order r \<Longrightarrow>
   o1 <=_(le r) o2 \<longrightarrow> o2 <=_(le r) o3 \<longrightarrow> o1 <=_(le r) o3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order r \<Longrightarrow> o1 \<sqsubseteq>\<^bsub>Opt.le r\<^esub> o2 \<longrightarrow> o2 \<sqsubseteq>\<^bsub>Opt.le r\<^esub> o3 \<longrightarrow> o1 \<sqsubseteq>\<^bsub>Opt.le r\<^esub> o3
[PROOF STEP]
apply (simp add: unfold_le_opt split: option.split)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order r \<Longrightarrow> \<forall>x2 x2a. o1 = Some x2a \<longrightarrow> o3 = Some x2 \<longrightarrow> (\<forall>x2b. o2 = Some x2b \<longrightarrow> x2a \<sqsubseteq>\<^bsub>r\<^esub> x2b \<longrightarrow> x2b \<sqsubseteq>\<^bsub>r\<^esub> x2 \<longrightarrow> x2a \<sqsubseteq>\<^bsub>r\<^esub> x2)
[PROOF STEP]
apply (blast intro: order_trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma sat\<^sub>b_RESTRICT: "sat\<^sub>b \<AA> \<phi> \<longleftrightarrow> \<AA> \<Turnstile>\<^sub>b RESTRICT \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat\<^sub>b \<AA> \<phi> = (\<AA> \<Turnstile>\<^sub>b RESTRICT \<phi>)
[PROOF STEP]
unfolding sat\<^sub>b_def RESTRICT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat_vars_gen (\<lambda>k P. (\<le>) (len P)) UNIV \<AA> \<phi> = (\<AA> \<Turnstile>\<^sub>b RESTRICT_VARS enum_class.enum (sorted_list_of_set \<circ> FV \<phi>) \<phi>)
[PROOF STEP]
using sat_vars_RESTRICT_VARS[of Enum.enum, symmetric]
[PROOF STATE]
proof (prove)
using this:
\<forall>k\<in>set enum_class.enum. finite (FV ?\<phi> k) \<Longrightarrow> satisfies_gen ?r ?\<AA> (RESTRICT_VARS enum_class.enum (sorted_list_of_set \<circ> FV ?\<phi>) ?\<phi>) = sat_vars_gen ?r (set enum_class.enum) ?\<AA> ?\<phi>

goal (1 subgoal):
 1. sat_vars_gen (\<lambda>k P. (\<le>) (len P)) UNIV \<AA> \<phi> = (\<AA> \<Turnstile>\<^sub>b RESTRICT_VARS enum_class.enum (sorted_list_of_set \<circ> FV \<phi>) \<phi>)
[PROOF STEP]
by (auto simp: finite_FV enum_UNIV)


[STATEMENT]
theorem M9: "|~ \<box>F \<longrightarrow> F \<and> \<circle>\<box>F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |~ \<box>F \<longrightarrow> F \<and> \<circle>\<box>F
[PROOF STEP]
using pre[OF ax1[of "F"]] pax3[of "F"]
[PROOF STATE]
proof (prove)
using this:
|~ \<box>F \<longrightarrow> F
|~ \<box>F \<longrightarrow> \<circle>\<box>F

goal (1 subgoal):
 1. |~ \<box>F \<longrightarrow> F \<and> \<circle>\<box>F
[PROOF STEP]
by force


[STATEMENT]
lemma trancl_list_impl:
  "set (trancl_list_impl r as) = {b. \<exists> a \<in> set as. (a, b) \<in> (set r)\<^sup>+}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (trancl_list_impl r as) = {b. \<exists>a\<in>set as. (a, b) \<in> (set r)\<^sup>+}
[PROOF STEP]
unfolding trancl_list_impl_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (trancl_impl (\<lambda>r as. remdups (map snd (filter (\<lambda>(a, b). a \<in> set as) r))) (\<lambda>xs ys. filter (\<lambda>x. x \<notin> set ys) xs @ ys) (\<lambda>x xs. x \<in> set xs) [] r as) = {b. \<exists>a\<in>set as. (a, b) \<in> (set r)\<^sup>+}
[PROOF STEP]
by (rule set_access_gen.trancl_impl, unfold_locales, force+)


[STATEMENT]
lemma concat_pair_set :
  "set (concat (map (\<lambda>x. map (Pair x) ys) xs)) = {xy . fst xy \<in> set xs \<and> snd xy \<in> set ys}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (concat (map (\<lambda>x. map (Pair x) ys) xs)) = {xy. fst xy \<in> set xs \<and> snd xy \<in> set ys}
[PROOF STEP]
by auto


[STATEMENT]
lemma has_bochner_integral_iff:
  "has_bochner_integral M f x \<longleftrightarrow> integrable M f \<and> integral\<^sup>L M f = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_bochner_integral M f x = (integrable M f \<and> integral\<^sup>L M f = x)
[PROOF STEP]
by (metis has_bochner_integral_integrable has_bochner_integral_integral_eq integrable.intros)


[STATEMENT]
lemma iprop10: "Fr_1 \<F> \<Longrightarrow> Fr_2 \<F> \<Longrightarrow> Fr_3 \<F> \<Longrightarrow> Fr_4 \<F> \<Longrightarrow> \<forall>a b c. (a \<^bold>\<Rightarrow> (b \<^bold>\<Rightarrow> c)) \<^bold>\<Rightarrow> ((a \<^bold>\<Rightarrow> b) \<^bold>\<Rightarrow> (a \<^bold>\<Rightarrow> c)) \<^bold>\<approx> \<^bold>\<top>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Fr_1 \<F>; Fr_2 \<F>; Fr_3 \<F>; Fr_4 \<F>\<rbrakk> \<Longrightarrow> \<forall>a b c w. (((c \<^bold>\<Leftarrow> a) \<^bold>\<Leftarrow> (b \<^bold>\<Leftarrow> a)) \<^bold>\<Leftarrow> ((c \<^bold>\<Leftarrow> b) \<^bold>\<Leftarrow> a)) w = \<^bold>\<top> w
[PROOF STEP]
by (simp add: DTw2 iprop10')


[STATEMENT]
lemma residual_countable_network:
  assumes wf: "wf_residual_network"
  and f: "flow \<Delta> f"
  shows "countable_network (residual_network f)" (is "countable_network ?\<Delta>")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_network (residual_network f)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. countable \<^bold>E\<^bsub>residual_network f\<^esub>
 2. source (residual_network f) \<noteq> sink (residual_network f)
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub> \<Longrightarrow> capacity (residual_network f) e = 0
 4. \<And>e. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
have "countable (converse \<^bold>E)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable (\<^bold>E\<inverse>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
countable (\<^bold>E\<inverse>)

goal (4 subgoals):
 1. countable \<^bold>E\<^bsub>residual_network f\<^esub>
 2. source (residual_network f) \<noteq> sink (residual_network f)
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub> \<Longrightarrow> capacity (residual_network f) e = 0
 4. \<And>e. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
countable (\<^bold>E\<inverse>)
[PROOF STEP]
have "countable {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>}"
[PROOF STATE]
proof (prove)
using this:
countable (\<^bold>E\<inverse>)

goal (1 subgoal):
 1. countable {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>}
[PROOF STEP]
by(rule countable_subset[rotated]) auto
[PROOF STATE]
proof (state)
this:
countable {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>}

goal (4 subgoals):
 1. countable \<^bold>E\<^bsub>residual_network f\<^esub>
 2. source (residual_network f) \<noteq> sink (residual_network f)
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub> \<Longrightarrow> capacity (residual_network f) e = 0
 4. \<And>e. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
countable {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>}
[PROOF STEP]
show "countable \<^bold>E\<^bsub>?\<Delta>\<^esub>"
[PROOF STATE]
proof (prove)
using this:
countable {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>}

goal (1 subgoal):
 1. countable \<^bold>E\<^bsub>residual_network f\<^esub>
[PROOF STEP]
unfolding "\<^bold>E_residual_network"
[PROOF STATE]
proof (prove)
using this:
countable {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>}

goal (1 subgoal):
 1. countable (\<^bold>E \<union> {(x, y). (y, x) \<in> \<^bold>E \<and> y \<noteq> source \<Delta>})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
countable \<^bold>E\<^bsub>residual_network f\<^esub>

goal (3 subgoals):
 1. source (residual_network f) \<noteq> sink (residual_network f)
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub> \<Longrightarrow> capacity (residual_network f) e = 0
 3. \<And>e. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
show "source ?\<Delta> \<noteq> sink ?\<Delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. source (residual_network f) \<noteq> sink (residual_network f)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
source (residual_network f) \<noteq> sink (residual_network f)

goal (2 subgoals):
 1. \<And>e. e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub> \<Longrightarrow> capacity (residual_network f) e = 0
 2. \<And>e. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
show "capacity ?\<Delta> e = 0" if "e \<notin> \<^bold>E\<^bsub>?\<Delta>\<^esub>" for e
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. capacity (residual_network f) e = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub>

goal (1 subgoal):
 1. capacity (residual_network f) e = 0
[PROOF STEP]
by(cases e)(auto intro: flowD_outside[OF f])
[PROOF STATE]
proof (state)
this:
?e \<notin> \<^bold>E\<^bsub>residual_network f\<^esub> \<Longrightarrow> capacity (residual_network f) ?e = 0

goal (1 subgoal):
 1. \<And>e. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
show "capacity ?\<Delta> e \<noteq> top" for e
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
using flowD_finite[OF f]
[PROOF STATE]
proof (prove)
using this:
f ?e \<noteq> \<top>

goal (1 subgoal):
 1. capacity (residual_network f) e \<noteq> \<top>
[PROOF STEP]
by(cases e) auto
[PROOF STATE]
proof (state)
this:
capacity (residual_network f) ?e \<noteq> \<top>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma zero_singleton[simp]: "zero {(z,z)} = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zero {(z, z)} = z
[PROOF STEP]
using wo_rel.zero_in_Field[unfolded wo_rel_def, of "{(z, z)}"] well_order_on_singleton[of z]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Well_order {(z, z)}; Field {(z, z)} \<noteq> {}\<rbrakk> \<Longrightarrow> zero {(z, z)} \<in> Field {(z, z)}
well_order_on {z} {(z, z)}

goal (1 subgoal):
 1. zero {(z, z)} = z
[PROOF STEP]
by auto


[STATEMENT]
lemma [code abstract]: "vec_nth (a * b) =  (%i. a$i * b$i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (a * b) = (\<lambda>i. a $ i * b $ i)
[PROOF STEP]
unfolding vector_mult_component
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. a $ i * b $ i) = (\<lambda>i. a $ i * b $ i)
[PROOF STEP]
by auto


[STATEMENT]
lemma set_neg_intro2: "a \<in> C \<Longrightarrow> - a \<in> (- 1) *o C"
  for a :: "'a::ring_1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> C \<Longrightarrow> - a \<in> - (1::'a) *o C
[PROOF STEP]
by (auto simp add: elt_set_times_def)


[STATEMENT]
lemma ennreal_add_left_cancel: "a + b = a + c \<longleftrightarrow> a = (\<infinity>::ennreal) \<or> b = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a + b = a + c) = (a = \<infinity> \<or> b = c)
[PROOF STEP]
unfolding infinity_ennreal_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a + b = a + c) = (a = top \<or> b = c)
[PROOF STEP]
by transfer (simp add: top_ereal_def ereal_add_cancel_left)


[STATEMENT]
lemma has_integral_const_real [intro]:
  fixes a b :: real
  shows "((\<lambda>x. c) has_integral (content {a..b} *\<^sub>R c)) {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. c) has_integral content {a..b} *\<^sub>R c) {a..b}
[PROOF STEP]
by (metis box_real(2) has_integral_const)


[STATEMENT]
lemma i_Exec_Stream_Pre_Post2: "
  \<lbrakk> c_n = (i_Exec_Comp_Stream trans_fun input c)\<^bsup>\<leftarrow> c\<^esup> n; x_n = input n \<rbrakk> \<Longrightarrow>
  (P c_n \<longrightarrow> Q (input n) (i_Exec_Comp_Stream trans_fun input c n)) =
  (P c_n \<longrightarrow> Q x_n (trans_fun x_n c_n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c_n = (i_Exec_Comp_Stream trans_fun input c)\<^bsup>\<leftarrow> c\<^esup> n; x_n = input n\<rbrakk> \<Longrightarrow> (P c_n \<longrightarrow> Q (input n) (i_Exec_Comp_Stream trans_fun input c n)) = (P c_n \<longrightarrow> Q x_n (trans_fun x_n c_n))
[PROOF STEP]
by (simp add: i_Exec_Stream_nth_calc_Previous)


[STATEMENT]
lemma ennreal_le_iff[simp]: "0 \<le> y \<Longrightarrow> ennreal x \<le> ennreal y \<longleftrightarrow> x \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> y \<Longrightarrow> (ennreal x \<le> ennreal y) = (x \<le> y)
[PROOF STEP]
by (auto simp: ennreal_def zero_ereal_def less_eq_ennreal.abs_eq eq_onp_def split: split_max)


[STATEMENT]
lemma monomial_inj:
  "monomial c s = monomial (d::'b::zero_neq_one) t \<longleftrightarrow> (c = 0 \<and> d = 0) \<or> (c = d \<and> s = t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (monomial c s = monomial d t) = (c = (0::'b) \<and> d = (0::'b) \<or> c = d \<and> s = t)
[PROOF STEP]
by (fastforce simp add: monomial_inj Poly_Mapping.single_def
    poly_mapping.Abs_poly_mapping_inject when_def fun_eq_iff
    cong: if_cong
    split: if_splits)


[STATEMENT]
lemma (in Corps) value_ge_add:"\<lbrakk>valuation K v; \<forall>j \<le> n. f j \<in> carrier K;
                     \<forall>j \<le> n. z \<le> ((v \<circ> f) j)\<rbrakk>  \<Longrightarrow> z \<le> (v (\<Sigma>\<^sub>e K f n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; \<forall>j\<le>n. f j \<in> carrier K; \<forall>j\<le>n. z \<le> (v \<circ> f) j\<rbrakk> \<Longrightarrow> z \<le> v (\<Sigma>\<^sub>e K f n)
[PROOF STEP]
apply (frule Amin_le_add[of v n f], assumption+,
       cut_tac Amin_ge[of n "v \<circ> f" z],
       rule ale_trans, assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; \<forall>j\<le>n. f j \<in> carrier K; \<forall>j\<le>n. z \<le> (v \<circ> f) j; Amin n (v \<circ> f) \<le> v (\<Sigma>\<^sub>e K f n)\<rbrakk> \<Longrightarrow> \<forall>j\<le>n. (v \<circ> f) j \<in> Z\<^sub>\<infinity>
 2. \<lbrakk>valuation K v; \<forall>j\<le>n. f j \<in> carrier K; \<forall>j\<le>n. z \<le> (v \<circ> f) j; Amin n (v \<circ> f) \<le> v (\<Sigma>\<^sub>e K f n)\<rbrakk> \<Longrightarrow> \<forall>j\<le>n. z \<le> (v \<circ> f) j
[PROOF STEP]
apply (rule allI, rule impI,
       simp add:comp_def Zset_def,
       rule value_in_aug_inf[of v], assumption+, simp+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma consistent_prv_eql_pls_plus_rev:
assumes "consistent" "prv (eql (pls (Num m) (Num n)) (Num k))"
shows "k = m + n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k = m + n
[PROOF STEP]
by (metis Num assms consistent_def eql not_plus_prv_neg_eql_pls num pls prv_neg_fls subsetCE)


[STATEMENT]
lemma Arr_Subst:
    assumes "Arr v"
    shows "Arr t \<Longrightarrow> Arr (Subst n v t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Arr t \<Longrightarrow> Arr (Subst n v t)
[PROOF STEP]
using assms Arr_Raise FV_Subst
[PROOF STATE]
proof (prove)
using this:
Arr v
Arr ?t = Arr (Raise ?d ?n ?t)
FV (Subst ?d ?v ?t) = FV ?t \<inter> {x. x < ?d} \<union> (\<lambda>x. x - 1) ` {x. ?d < x \<and> x \<in> FV ?t} \<union> (\<lambda>x. x + ?d) ` {x. ?d \<in> FV ?t \<and> x \<in> FV ?v}

goal (1 subgoal):
 1. Arr t \<Longrightarrow> Arr (Subst n v t)
[PROOF STEP]
by (induct t arbitrary: n) auto


[STATEMENT]
theorem supplement1_Jacobi:
  "odd p \<Longrightarrow> 1 < p \<Longrightarrow> Jacobi (-1) p = (-1) ^ (nat ((p - 1) div 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>odd p; 1 < p\<rbrakk> \<Longrightarrow> Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)
[PROOF STEP]
proof (induction p rule: prime_divisors_induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
case (factor p x)
[PROOF STATE]
proof (state)
this:
prime p
\<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
odd (p * x)
1 < p * x

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
prime p
\<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
odd (p * x)
1 < p * x
[PROOF STEP]
have "odd x"
[PROOF STATE]
proof (prove)
using this:
prime p
\<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
odd (p * x)
1 < p * x

goal (1 subgoal):
 1. odd x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
odd x

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "2 < p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 < p
[PROOF STEP]
using \<open>odd (p * x)\<close> prime_gt_1_int[OF \<open>prime p\<close>]
[PROOF STATE]
proof (prove)
using this:
odd (p * x)
1 < p

goal (1 subgoal):
 1. 2 < p
[PROOF STEP]
by (cases "p = 2") auto
[PROOF STATE]
proof (state)
this:
2 < p

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "prime (nat p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime (nat p)
[PROOF STEP]
using \<open>prime p\<close> prime_int_nat_transfer
[PROOF STATE]
proof (prove)
using this:
prime p
prime ?k = (0 \<le> ?k \<and> prime (nat ?k))

goal (1 subgoal):
 1. prime (nat p)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
prime (nat p)

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "Jacobi (-1) p = Legendre (-1) p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Jacobi (- 1) p = Legendre (- 1) p
[PROOF STEP]
using prime_p_Jacobi_eq_Legendre[OF \<open>prime p\<close>]
[PROOF STATE]
proof (prove)
using this:
Jacobi ?a p = Legendre ?a p

goal (1 subgoal):
 1. Jacobi (- 1) p = Legendre (- 1) p
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) p = Legendre (- 1) p

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) p = Legendre (- 1) p

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "... = (-1) ^ ((nat p - 1) div 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Legendre (- 1) p = (- 1) ^ ((nat p - 1) div 2)
[PROOF STEP]
using \<open>prime p\<close> \<open>2 < p\<close> and supplement1_Legendre[of "nat p"]
[PROOF STATE]
proof (prove)
using this:
prime p
2 < p
\<lbrakk>prime (nat p); 2 < nat p\<rbrakk> \<Longrightarrow> Legendre (- 1) (int (nat p)) = (- 1) ^ ((nat p - 1) div 2)

goal (1 subgoal):
 1. Legendre (- 1) p = (- 1) ^ ((nat p - 1) div 2)
[PROOF STEP]
by (metis int_nat_eq nat_mono_iff nat_numeral_as_int prime_gt_0_int prime_int_nat_transfer)
[PROOF STATE]
proof (state)
this:
Legendre (- 1) p = (- 1) ^ ((nat p - 1) div 2)

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Legendre (- 1) p = (- 1) ^ ((nat p - 1) div 2)

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "((nat p - 1) div 2) = nat ((p - 1) div 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (nat p - 1) div 2 = nat ((p - 1) div 2)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(nat p - 1) div 2 = nat ((p - 1) div 2)

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)
[PROOF STEP]
have base_case: "Jacobi (-1) p = (-1) ^ nat ((p - 1) div 2)"
[PROOF STATE]
proof (prove)
using this:
Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)

goal (1 subgoal):
 1. Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)

goal (3 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
 3. \<And>p x. \<lbrakk>prime p; \<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2); odd (p * x); 1 < p * x\<rbrakk> \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
proof (cases "x = 1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
 2. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = 1

goal (2 subgoals):
 1. x = 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
 2. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = 1

goal (1 subgoal):
 1. Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
using base_case
[PROOF STATE]
proof (prove)
using this:
x = 1
Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)

goal (1 subgoal):
 1. Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> 1

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "0 < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x
[PROOF STEP]
using \<open>1 < (p * x)\<close> prime_gt_0_int[OF \<open>prime p\<close>]
[PROOF STATE]
proof (prove)
using this:
1 < p * x
0 < p

goal (1 subgoal):
 1. 0 < x
[PROOF STEP]
by (meson int_one_le_iff_zero_less not_less not_less_iff_gr_or_eq zero_less_mult_iff)
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "odd p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd p
[PROOF STEP]
using \<open>prime p\<close> \<open>2 < p\<close>
[PROOF STATE]
proof (prove)
using this:
prime p
2 < p

goal (1 subgoal):
 1. odd p
[PROOF STEP]
by (simp add: prime_odd_int)
[PROOF STATE]
proof (state)
this:
odd p

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "Jacobi (-1) (p * x) = Jacobi (-1) p * Jacobi (-1) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Jacobi (- 1) (p * x) = Jacobi (- 1) p * Jacobi (- 1) x
[PROOF STEP]
using \<open>2 < p\<close> \<open>0 < x\<close>
[PROOF STATE]
proof (prove)
using this:
2 < p
0 < x

goal (1 subgoal):
 1. Jacobi (- 1) (p * x) = Jacobi (- 1) p * Jacobi (- 1) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) (p * x) = Jacobi (- 1) p * Jacobi (- 1) x

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) (p * x) = Jacobi (- 1) p * Jacobi (- 1) x

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
note base_case
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) p = (- 1) ^ nat ((p - 1) div 2)

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "Jacobi (-1) x = (-1) ^ nat ((x - 1) div 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
[PROOF STEP]
using \<open>0 < x\<close> False \<open>odd x\<close> factor.IH
[PROOF STATE]
proof (prove)
using this:
0 < x
x \<noteq> 1
odd x
\<lbrakk>odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)

goal (1 subgoal):
 1. Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
have "(- 1) ^ nat ((p - 1) div 2) * (- 1) ^ nat ((x - 1) div 2) =
               (- 1 :: int) ^ nat ((p*x - 1) div 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- 1) ^ nat ((p - 1) div 2) * (- 1) ^ nat ((x - 1) div 2) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
unfolding minus_one_power_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if even (nat ((p - 1) div 2)) then 1 else - 1) * (if even (nat ((x - 1) div 2)) then 1 else - 1) = (if even (nat ((p * x - 1) div 2)) then 1 else - 1)
[PROOF STEP]
using \<open>2 < p\<close> \<open>0 < x\<close> and \<open>odd x\<close> \<open>odd p\<close>
[PROOF STATE]
proof (prove)
using this:
2 < p
0 < x
odd x
odd p

goal (1 subgoal):
 1. (if even (nat ((p - 1) div 2)) then 1 else - 1) * (if even (nat ((x - 1) div 2)) then 1 else - 1) = (if even (nat ((p * x - 1) div 2)) then 1 else - 1)
[PROOF STEP]
by (fastforce elim!: oddE simp: even_nat_iff algebra_simps)
[PROOF STATE]
proof (state)
this:
(- 1) ^ nat ((p - 1) div 2) * (- 1) ^ nat ((x - 1) div 2) = (- 1) ^ nat ((p * x - 1) div 2)

goal (1 subgoal):
 1. x \<noteq> 1 \<Longrightarrow> Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)

goal (1 subgoal):
 1. Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Jacobi (- 1) (p * x) = (- 1) ^ nat ((p * x - 1) div 2)

goal (2 subgoals):
 1. \<lbrakk>odd 0; 1 < 0\<rbrakk> \<Longrightarrow> Jacobi (- 1) 0 = (- 1) ^ nat ((0 - 1) div 2)
 2. \<And>x. \<lbrakk>is_unit x; odd x; 1 < x\<rbrakk> \<Longrightarrow> Jacobi (- 1) x = (- 1) ^ nat ((x - 1) div 2)
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma chain_map_id_gen:
   "\<lbrakk>singular_chain p X c; \<And>x. x \<in> topspace X \<Longrightarrow> f x = x\<rbrakk>
    \<Longrightarrow>  chain_map p f c = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>singular_chain p X c; \<And>x. x \<in> topspace X \<Longrightarrow> f x = x\<rbrakk> \<Longrightarrow> chain_map p f c = c
[PROOF STEP]
unfolding singular_chain_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Poly_Mapping.keys c \<subseteq> singular_simplex_set p X; \<And>x. x \<in> topspace X \<Longrightarrow> f x = x\<rbrakk> \<Longrightarrow> chain_map p f c = c
[PROOF STEP]
by (erule frag_induction) (auto simp: chain_map_diff simplex_map_id_gen)


[STATEMENT]
lemma omega_simulation_2:
  "y * x \<le> x * y \<Longrightarrow> (x * y)\<^sup>\<omega> \<le> x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y * x \<le> x * y \<Longrightarrow> (x * y)\<^sup>\<omega> \<le> x\<^sup>\<omega>
[PROOF STEP]
by (metis mult_right_isotone sup.absorb2 omega_induct_mult omega_slide omega_sub_dist)


[STATEMENT]
lemma  left_diff_distrib: "(x - y) \<times> z = x \<times> z - y \<times> z" for x::"real^3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - y) \<times> z = x \<times> z - y \<times> z
[PROOF STEP]
by (simp add: cross3_simps)


[STATEMENT]
lemma separating_hyperplane_set_point_inaff:
  fixes S :: "'a::euclidean_space set"
  assumes "convex S" "S \<noteq> {}" and zno: "z \<notin> S"
  obtains a b where "(z + a) \<in> affine hull (insert z S)"
                and "a \<noteq> 0" and "a \<bullet> z \<le> b"
                and "\<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from separating_hyperplane_set_0_inspan [of "image (\<lambda>x. -z + x) S"]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>convex ((+) (- z) ` S); (+) (- z) ` S \<noteq> {}; (0::'a) \<notin> (+) (- z) ` S; \<And>a. \<lbrakk>a \<in> span ((+) (- z) ` S); a \<noteq> (0::'a); \<And>x. x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
have "convex ((+) (- z) ` S)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>convex ((+) (- z) ` S); (+) (- z) ` S \<noteq> {}; (0::'a) \<notin> (+) (- z) ` S; \<And>a. \<lbrakk>a \<in> span ((+) (- z) ` S); a \<noteq> (0::'a); \<And>x. x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. convex ((+) (- z) ` S)
[PROOF STEP]
using \<open>convex S\<close>
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>convex ((+) (- z) ` S); (+) (- z) ` S \<noteq> {}; (0::'a) \<notin> (+) (- z) ` S; \<And>a. \<lbrakk>a \<in> span ((+) (- z) ` S); a \<noteq> (0::'a); \<And>x. x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
convex S

goal (1 subgoal):
 1. convex ((+) (- z) ` S)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
convex ((+) (- z) ` S)

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
convex ((+) (- z) ` S)

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "(+) (- z) ` S \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) (- z) ` S \<noteq> {}
[PROOF STEP]
by (simp add: \<open>S \<noteq> {}\<close>)
[PROOF STATE]
proof (state)
this:
(+) (- z) ` S \<noteq> {}

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(+) (- z) ` S \<noteq> {}

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "0 \<notin> (+) (- z) ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) \<notin> (+) (- z) ` S
[PROOF STEP]
using zno
[PROOF STATE]
proof (prove)
using this:
z \<notin> S

goal (1 subgoal):
 1. (0::'a) \<notin> (+) (- z) ` S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(0::'a) \<notin> (+) (- z) ` S

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
convex ((+) (- z) ` S)
(+) (- z) ` S \<noteq> {}
(0::'a) \<notin> (+) (- z) ` S
[PROOF STEP]
obtain a where "a \<in> span ((+) (- z) ` S)" "a \<noteq> 0"
                  and a:  "\<And>x. x \<in> ((+) (- z) ` S) \<Longrightarrow> 0 \<le> a \<bullet> x"
[PROOF STATE]
proof (prove)
using this:
convex ((+) (- z) ` S)
(+) (- z) ` S \<noteq> {}
(0::'a) \<notin> (+) (- z) ` S

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> span ((+) (- z) ` S); a \<noteq> (0::'a); \<And>x. x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using separating_hyperplane_set_0_inspan [of "image (\<lambda>x. -z + x) S"]
[PROOF STATE]
proof (prove)
using this:
convex ((+) (- z) ` S)
(+) (- z) ` S \<noteq> {}
(0::'a) \<notin> (+) (- z) ` S
\<lbrakk>convex ((+) (- z) ` S); (+) (- z) ` S \<noteq> {}; (0::'a) \<notin> (+) (- z) ` S; \<And>a. \<lbrakk>a \<in> span ((+) (- z) ` S); a \<noteq> (0::'a); \<And>x. x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> span ((+) (- z) ` S); a \<noteq> (0::'a); \<And>x. x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> span ((+) (- z) ` S)
a \<noteq> (0::'a)
?x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> ?x

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> span ((+) (- z) ` S)
a \<noteq> (0::'a)
?x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> ?x
[PROOF STEP]
have szx: "\<And>x. x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> x"
[PROOF STATE]
proof (prove)
using this:
a \<in> span ((+) (- z) ` S)
a \<noteq> (0::'a)
?x \<in> (+) (- z) ` S \<Longrightarrow> 0 \<le> a \<bullet> ?x

goal (1 subgoal):
 1. \<And>x. x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> x
[PROOF STEP]
by (metis (no_types, lifting) imageI inner_minus_right inner_right_distrib minus_add neg_le_0_iff_le neg_le_iff_le real_add_le_0_iff)
[PROOF STATE]
proof (state)
this:
?x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> ?x

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> ?x

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "z + a \<in> affine hull insert z S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z + a \<in> affine hull insert z S
[PROOF STEP]
using \<open>a \<in> span ((+) (- z) ` S)\<close> affine_hull_insert_span_gen
[PROOF STATE]
proof (prove)
using this:
a \<in> span ((+) (- z) ` S)
affine hull insert ?a ?s = (+) ?a ` span ((+) (- ?a) ` ?s)

goal (1 subgoal):
 1. z + a \<in> affine hull insert z S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z + a \<in> affine hull insert z S

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>z + a \<in> affine hull insert z S; a \<noteq> (0::'a); a \<bullet> z \<le> b; \<And>x. x \<in> S \<Longrightarrow> b \<le> a \<bullet> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
?x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> ?x
z + a \<in> affine hull insert z S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> ?x
z + a \<in> affine hull insert z S

goal (1 subgoal):
 1. thesis
[PROOF STEP]
using \<open>a \<noteq> 0\<close> szx that
[PROOF STATE]
proof (prove)
using this:
?x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> ?x
z + a \<in> affine hull insert z S
a \<noteq> (0::'a)
?x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> ?x
\<lbrakk>z + ?a \<in> affine hull insert z S; ?a \<noteq> (0::'a); ?a \<bullet> z \<le> ?b; \<And>x. x \<in> S \<Longrightarrow> ?b \<le> ?a \<bullet> x\<rbrakk> \<Longrightarrow> thesis

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma primitive_part_dvd: "primitive_part a dvd a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primitive_part a dvd a
[PROOF STEP]
by (metis content_times_primitive_part dvd_def dvd_refl mult_smult_right)


[STATEMENT]
lemma pred_envir_mono: "\<lbrakk> pred_envir p f; \<And>x. p (f x) \<Longrightarrow> q (g x) \<rbrakk> \<Longrightarrow> pred_envir q g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pred_envir p f; \<And>x. p (f x) \<Longrightarrow> q (g x)\<rbrakk> \<Longrightarrow> pred_envir q g
[PROOF STEP]
by blast