[STATEMENT]
lemma jump_divide_derivative:
  assumes "isCont f x" "g x = 0" "f x\<noteq>0"
    and g_deriv:"(g has_field_derivative c) (at x)" and "c\<noteq>0"
  shows "jump (\<lambda>t. f t/g t) x = (if sgn c = sgn ( f x) then 1 else -1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have g_tendsto:"(g \<longlongrightarrow> 0) (at_left x)" "(g \<longlongrightarrow> 0) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g \<longlongrightarrow> 0) (at_left x) &&& (g \<longlongrightarrow> 0) (at_right x)
[PROOF STEP]
by (metis DERIV_isCont Lim_at_imp_Lim_at_within assms(2) assms(4) continuous_at)+
[PROOF STATE]
proof (state)
this:
(g \<longlongrightarrow> 0) (at_left x)
(g \<longlongrightarrow> 0) (at_right x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have f_tendsto:"(f \<longlongrightarrow> f x) (at_left x)" "(f \<longlongrightarrow> f x) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> f x) (at_left x) &&& (f \<longlongrightarrow> f x) (at_right x)
[PROOF STEP]
using Lim_at_imp_Lim_at_within assms(1) continuous_at
[PROOF STATE]
proof (prove)
using this:
?f \<midarrow>?x\<rightarrow> ?l \<Longrightarrow> (?f \<longlongrightarrow> ?l) (at ?x within ?S)
isCont f x
isCont ?f ?x = ?f \<midarrow>?x\<rightarrow> ?f ?x

goal (1 subgoal):
 1. (f \<longlongrightarrow> f x) (at_left x) &&& (f \<longlongrightarrow> f x) (at_right x)
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> f x) (at_left x)
(f \<longlongrightarrow> f x) (at_right x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have ?thesis when "c>0" "f x>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx - sgn (f x)) (at_left x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_left x)
[PROOF STEP]
using has_sgnx_derivative_at_left[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx - sgn c) (at_left x)
0 < c
0 < f x

goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_left x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx - sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g has_sgnx - sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx sgn (f x)) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_right x)
[PROOF STEP]
using has_sgnx_derivative_at_right[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx sgn c) (at_right x)
0 < c
0 < f x

goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_right x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx sgn (f x)) (at_right x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)
[PROOF STEP]
have "(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)"
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
[PROOF STEP]
using filterlim_divide_at_bot_at_top_iff[OF _ \<open>f x\<noteq>0\<close>, of f]
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
[PROOF STEP]
using f_tendsto(1) f_tendsto(2) g_tendsto(1) g_tendsto(2)
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)
(f \<longlongrightarrow> f x) (at_left x)
(f \<longlongrightarrow> f x) (at_right x)
(g \<longlongrightarrow> 0) (at_left x)
(g \<longlongrightarrow> 0) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "sgn c = sgn (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn c = sgn (f x)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 < c
0 < f x

goal (1 subgoal):
 1. sgn c = sgn (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgn c = sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
sgn c = sgn (f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
sgn c = sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
unfolding jump_def
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
sgn c = sgn (f x)

goal (1 subgoal):
 1. (if (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top) then 1 else if (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot) then - 1 else 0) = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < c; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < c; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have ?thesis when "c>0" "f x<0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx sgn (f x)) (at_left x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_left x)
[PROOF STEP]
using has_sgnx_derivative_at_left[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx - sgn c) (at_left x)
0 < c
f x < 0

goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_left x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g has_sgnx sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx - sgn (f x)) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_right x)
[PROOF STEP]
using has_sgnx_derivative_at_right[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx sgn c) (at_right x)
0 < c
f x < 0

goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_right x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx - sgn (f x)) (at_right x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)
[PROOF STEP]
have "(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)"
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
using filterlim_divide_at_bot_at_top_iff[OF _ \<open>f x\<noteq>0\<close>, of f]
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
using f_tendsto(1) f_tendsto(2) g_tendsto(1) g_tendsto(2)
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)
(f \<longlongrightarrow> f x) (at_left x)
(f \<longlongrightarrow> f x) (at_right x)
(g \<longlongrightarrow> 0) (at_left x)
(g \<longlongrightarrow> 0) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
have "\<not> (LIM t at_left x. f t / g t :> at_bot)"
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)

goal (1 subgoal):
 1. \<not> (LIM t at_left x. f t / g t :> at_bot)
[PROOF STEP]
using filterlim_at_top_at_bot
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<lbrakk>filterlim ?f at_top ?F; filterlim ?f at_bot ?F; ?F \<noteq> bot\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. \<not> (LIM t at_left x. f t / g t :> at_bot)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<not> (LIM t at_left x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> (LIM t at_left x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "sgn c \<noteq> sgn (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn c \<noteq> sgn (f x)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 < c
f x < 0

goal (1 subgoal):
 1. sgn c \<noteq> sgn (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgn c \<noteq> sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<not> (LIM t at_left x. f t / g t :> at_bot)
sgn c \<noteq> sgn (f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<not> (LIM t at_left x. f t / g t :> at_bot)
sgn c \<noteq> sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
unfolding jump_def
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<not> (LIM t at_left x. f t / g t :> at_bot)
sgn c \<noteq> sgn (f x)

goal (1 subgoal):
 1. (if (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top) then 1 else if (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot) then - 1 else 0) = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < c; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < c; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have ?thesis when "c<0" "f x>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx sgn (f x)) (at_left x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_left x)
[PROOF STEP]
using has_sgnx_derivative_at_left[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx - sgn c) (at_left x)
c < 0
0 < f x

goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_left x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g has_sgnx sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx - sgn (f x)) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_right x)
[PROOF STEP]
using has_sgnx_derivative_at_right[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx sgn c) (at_right x)
c < 0
0 < f x

goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_right x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx - sgn (f x)) (at_right x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)
[PROOF STEP]
have "(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)"
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
using filterlim_divide_at_bot_at_top_iff[OF _ \<open>f x\<noteq>0\<close>, of f]
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
using f_tendsto(1) f_tendsto(2) g_tendsto(1) g_tendsto(2)
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx sgn (f x)) (at_left x)
(g has_sgnx - sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)
(f \<longlongrightarrow> f x) (at_left x)
(f \<longlongrightarrow> f x) (at_right x)
(g \<longlongrightarrow> 0) (at_left x)
(g \<longlongrightarrow> 0) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
[PROOF STEP]
have "\<not> (LIM t at_left x. f t / g t :> at_bot)"
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)

goal (1 subgoal):
 1. \<not> (LIM t at_left x. f t / g t :> at_bot)
[PROOF STEP]
using filterlim_at_top_at_bot
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<lbrakk>filterlim ?f at_top ?F; filterlim ?f at_bot ?F; ?F \<noteq> bot\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. \<not> (LIM t at_left x. f t / g t :> at_bot)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<not> (LIM t at_left x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> (LIM t at_left x. f t / g t :> at_bot)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "sgn c \<noteq> sgn (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn c \<noteq> sgn (f x)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
c < 0
0 < f x

goal (1 subgoal):
 1. sgn c \<noteq> sgn (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgn c \<noteq> sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<not> (LIM t at_left x. f t / g t :> at_bot)
sgn c \<noteq> sgn (f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<not> (LIM t at_left x. f t / g t :> at_bot)
sgn c \<noteq> sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
unfolding jump_def
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot)
\<not> (LIM t at_left x. f t / g t :> at_bot)
sgn c \<noteq> sgn (f x)

goal (1 subgoal):
 1. (if (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top) then 1 else if (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot) then - 1 else 0) = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>c < 0; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>c < 0; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have ?thesis when "c<0" "f x<0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx - sgn (f x)) (at_left x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_left x)
[PROOF STEP]
using has_sgnx_derivative_at_left[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx - sgn c) (at_left x)
c < 0
f x < 0

goal (1 subgoal):
 1. (g has_sgnx - sgn (f x)) (at_left x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx - sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g has_sgnx - sgn (f x)) (at_left x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "(g has_sgnx sgn (f x)) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_right x)
[PROOF STEP]
using has_sgnx_derivative_at_right[OF g_deriv \<open>g x=0\<close>] that
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0 \<Longrightarrow> (g has_sgnx sgn c) (at_right x)
c < 0
f x < 0

goal (1 subgoal):
 1. (g has_sgnx sgn (f x)) (at_right x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx sgn (f x)) (at_right x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)
[PROOF STEP]
have "(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)"
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
[PROOF STEP]
using filterlim_divide_at_bot_at_top_iff[OF _ \<open>f x\<noteq>0\<close>, of f]
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
[PROOF STEP]
using f_tendsto(1) f_tendsto(2) g_tendsto(1) g_tendsto(2)
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - sgn (f x)) (at_left x)
(g has_sgnx sgn (f x)) (at_right x)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_bot) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx - sgn (f x)) ?F)
(f \<longlongrightarrow> f x) ?F \<Longrightarrow> (LIM x ?F. f x / ?g x :> at_top) = ((?g \<longlongrightarrow> 0) ?F \<and> (?g has_sgnx sgn (f x)) ?F)
(f \<longlongrightarrow> f x) (at_left x)
(f \<longlongrightarrow> f x) (at_right x)
(g \<longlongrightarrow> 0) (at_left x)
(g \<longlongrightarrow> 0) (at_right x)

goal (1 subgoal):
 1. (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
have "sgn c =sgn (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn c = sgn (f x)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
c < 0
f x < 0

goal (1 subgoal):
 1. sgn c = sgn (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sgn c = sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
sgn c = sgn (f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
sgn c = sgn (f x)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
unfolding jump_def
[PROOF STATE]
proof (prove)
using this:
(LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top)
sgn c = sgn (f x)

goal (1 subgoal):
 1. (if (LIM t at_left x. f t / g t :> at_bot) \<and> (LIM t at_right x. f t / g t :> at_top) then 1 else if (LIM t at_left x. f t / g t :> at_top) \<and> (LIM t at_right x. f t / g t :> at_bot) then - 1 else 0) = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>c < 0; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < c; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>0 < c; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>c < 0; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>c < 0; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < c; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>0 < c; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>c < 0; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>c < 0; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
using \<open>c\<noteq>0\<close> \<open>f x\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < c; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>0 < c; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>c < 0; 0 < f x\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
\<lbrakk>c < 0; f x < 0\<rbrakk> \<Longrightarrow> jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
c \<noteq> 0
f x \<noteq> 0

goal (1 subgoal):
 1. jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)
[PROOF STEP]
by argo
[PROOF STATE]
proof (state)
this:
jump (\<lambda>t. f t / g t) x = (if sgn c = sgn (f x) then 1 else - 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cong_dvd_modulus:
  "[x = y] (mod n)" if "[x = y] (mod m)" and "n dvd m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [x = y] (mod n)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
[x = y] (mod m)
n dvd m

goal (1 subgoal):
 1. [x = y] (mod n)
[PROOF STEP]
by (auto intro: dvd_trans simp add: cong_iff_dvd_diff)


[STATEMENT]
lemma finvimage_frange_vsubset[simp]:
  assumes "\<R>\<^sub>\<bullet> r \<subseteq>\<^sub>\<circ> B"
  shows "r -`\<^sub>\<bullet> B = \<D>\<^sub>\<bullet> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r -`\<^sub>\<bullet> B = \<D>\<^sub>\<bullet> r
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<R>\<^sub>\<bullet> r \<subseteq>\<^sub>\<circ> B

goal (1 subgoal):
 1. r -`\<^sub>\<bullet> B = \<D>\<^sub>\<bullet> r
[PROOF STEP]
unfolding finvimage_def
[PROOF STATE]
proof (prove)
using this:
\<R>\<^sub>\<bullet> r \<subseteq>\<^sub>\<circ> B

goal (1 subgoal):
 1. r\<inverse>\<^sub>\<bullet> `\<^sub>\<bullet> B = \<D>\<^sub>\<bullet> r
[PROOF STEP]
by force


[STATEMENT]
lemma imirror_Max: "finite I \<Longrightarrow> Max (imirror I) = Max I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite I \<Longrightarrow> Max (imirror I) = Max I
[PROOF STEP]
apply (case_tac "I = {}", simp add: imirror_empty)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite I; I \<noteq> {}\<rbrakk> \<Longrightarrow> Max (imirror I) = Max I
[PROOF STEP]
apply (simp add: imirror_eq_imirror_bounds imirror_bounds_Max trans_le_add2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma successively_rev [simp]: "successively P (rev xs) \<longleftrightarrow> successively (\<lambda>x y. P y x) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. successively P (rev xs) = successively (\<lambda>x y. P y x) xs
[PROOF STEP]
by (induction xs rule: remdups_adj.induct)
     (auto simp: successively_append_iff successively_Cons)


[STATEMENT]
lemma rapprox_rat_nonneg_nonpos: "0 \<le> x \<Longrightarrow> y \<le> 0 \<Longrightarrow> real_of_float (rapprox_rat n x y) \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> x; y \<le> 0\<rbrakk> \<Longrightarrow> real_of_float (rapprox_rat n x y) \<le> 0
[PROOF STEP]
by transfer (simp add: truncate_up_nonpos divide_nonneg_nonpos)


[STATEMENT]
lemma has_apx_least_fixpoint_kappa_apx_meet:
  assumes "has_least_fixpoint f"
      and "has_greatest_fixpoint f"
      and "apx.has_least_fixpoint f"
    shows "kappa_apx_meet f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. kappa_apx_meet f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. kappa_apx_meet f
[PROOF STEP]
have "\<forall>w . w \<sqsubseteq> \<mu> f \<and> w \<sqsubseteq> \<nu> f \<longrightarrow> w \<sqsubseteq> \<kappa> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>w. w \<sqsubseteq> \<mu> f \<and> w \<sqsubseteq> \<nu> f \<longrightarrow> w \<sqsubseteq> \<kappa> f
[PROOF STEP]
by (meson assms apx_def order.trans kappa_below_nu mu_below_kappa semiring.add_right_mono)
[PROOF STATE]
proof (state)
this:
\<forall>w. w \<sqsubseteq> \<mu> f \<and> w \<sqsubseteq> \<nu> f \<longrightarrow> w \<sqsubseteq> \<kappa> f

goal (1 subgoal):
 1. kappa_apx_meet f
[PROOF STEP]
hence "is_apx_meet (\<mu> f) (\<nu> f) (\<kappa> f)"
[PROOF STATE]
proof (prove)
using this:
\<forall>w. w \<sqsubseteq> \<mu> f \<and> w \<sqsubseteq> \<nu> f \<longrightarrow> w \<sqsubseteq> \<kappa> f

goal (1 subgoal):
 1. is_apx_meet (\<mu> f) (\<nu> f) (\<kappa> f)
[PROOF STEP]
by (simp add: assms is_apx_meet_def kappa_apx_below_mu kappa_apx_below_nu)
[PROOF STATE]
proof (state)
this:
is_apx_meet (\<mu> f) (\<nu> f) (\<kappa> f)

goal (1 subgoal):
 1. kappa_apx_meet f
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
is_apx_meet (\<mu> f) (\<nu> f) (\<kappa> f)

goal (1 subgoal):
 1. kappa_apx_meet f
[PROOF STEP]
by (simp add: assms(3) kappa_apx_meet_def apx_meet_char)
[PROOF STATE]
proof (state)
this:
kappa_apx_meet f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma \<nu>_stable_subfrmlsn:
  "\<nu>_stable \<phi> w \<Longrightarrow> \<psi> \<in> subfrmlsn \<phi> \<Longrightarrow> \<nu>_stable \<psi> w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<nu>_stable \<phi> w; \<psi> \<in> subfrmlsn \<phi>\<rbrakk> \<Longrightarrow> \<nu>_stable \<psi> w
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>\<nu>_stable \<phi> w; \<psi> \<in> subfrmlsn \<phi>\<rbrakk> \<Longrightarrow> \<nu>_stable \<psi> w
[PROOF STEP]
assume a1: "\<psi> \<in> subfrmlsn \<phi>" and a2: "\<nu>_stable \<phi> w"
[PROOF STATE]
proof (state)
this:
\<psi> \<in> subfrmlsn \<phi>
\<nu>_stable \<phi> w

goal (1 subgoal):
 1. \<lbrakk>\<nu>_stable \<phi> w; \<psi> \<in> subfrmlsn \<phi>\<rbrakk> \<Longrightarrow> \<nu>_stable \<psi> w
[PROOF STEP]
have "subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>
[PROOF STEP]
using a1
[PROOF STATE]
proof (prove)
using this:
\<psi> \<in> subfrmlsn \<phi>

goal (1 subgoal):
 1. subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>
[PROOF STEP]
by (simp add: subformulas\<^sub>\<nu>_subset)
[PROOF STATE]
proof (state)
this:
subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>

goal (1 subgoal):
 1. \<lbrakk>\<nu>_stable \<phi> w; \<psi> \<in> subfrmlsn \<phi>\<rbrakk> \<Longrightarrow> \<nu>_stable \<psi> w
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>

goal (1 subgoal):
 1. \<lbrakk>\<nu>_stable \<phi> w; \<psi> \<in> subfrmlsn \<phi>\<rbrakk> \<Longrightarrow> \<nu>_stable \<psi> w
[PROOF STEP]
have "\<F>\<G> \<phi> w = \<G> \<phi> w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<F>\<G> \<phi> w = \<G> \<phi> w
[PROOF STEP]
using a2
[PROOF STATE]
proof (prove)
using this:
\<nu>_stable \<phi> w

goal (1 subgoal):
 1. \<F>\<G> \<phi> w = \<G> \<phi> w
[PROOF STEP]
by (meson \<nu>_stable_def)
[PROOF STATE]
proof (state)
this:
\<F>\<G> \<phi> w = \<G> \<phi> w

goal (1 subgoal):
 1. \<lbrakk>\<nu>_stable \<phi> w; \<psi> \<in> subfrmlsn \<phi>\<rbrakk> \<Longrightarrow> \<nu>_stable \<psi> w
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>
\<F>\<G> \<phi> w = \<G> \<phi> w
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
subformulas\<^sub>\<nu> \<psi> \<subseteq> subformulas\<^sub>\<nu> \<phi>
\<F>\<G> \<phi> w = \<G> \<phi> w

goal (1 subgoal):
 1. \<nu>_stable \<psi> w
[PROOF STEP]
by (metis (no_types) Un_commute \<G>_semantics' \<F>\<G>_semantics' \<nu>_stable_def inf_left_commute inf_sup_absorb sup.orderE)
[PROOF STATE]
proof (state)
this:
\<nu>_stable \<psi> w

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma edge_preserving_unionI[intro]:
  assumes "edge_preserving f A G" "edge_preserving f B G"
  shows "edge_preserving f (A \<union> B) G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. edge_preserving f (A \<union> B) G
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
edge_preserving f A G
edge_preserving f B G

goal (1 subgoal):
 1. edge_preserving f (A \<union> B) G
[PROOF STEP]
unfolding edge_preserving_def
[PROOF STATE]
proof (prove)
using this:
\<forall>(k, v1, v2)\<in>A. \<forall>v1' v2'. (v1, v1') \<in> f \<and> (v2, v2') \<in> f \<longrightarrow> (k, v1', v2') \<in> G
\<forall>(k, v1, v2)\<in>B. \<forall>v1' v2'. (v1, v1') \<in> f \<and> (v2, v2') \<in> f \<longrightarrow> (k, v1', v2') \<in> G

goal (1 subgoal):
 1. \<forall>(k, v1, v2)\<in>A \<union> B. \<forall>v1' v2'. (v1, v1') \<in> f \<and> (v2, v2') \<in> f \<longrightarrow> (k, v1', v2') \<in> G
[PROOF STEP]
by blast


[STATEMENT]
lemma count_lower_result:
  "count (lower_result C) z =
     (if z = y then 0
      else if z = x then count C x + count C y
      else count C z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. count (lower_result C) z = (if z = y then 0 else if z = x then count C x + count C y else count C z)
[PROOF STEP]
using xy
[PROOF STATE]
proof (prove)
using this:
x \<in> parties
y \<in> parties
x \<noteq> y

goal (1 subgoal):
 1. count (lower_result C) z = (if z = y then 0 else if z = x then count C x + count C y else count C z)
[PROOF STEP]
by (induction C) (auto simp: lower_result_def)


[STATEMENT]
lemma square_free_smult: "c \<noteq> 0 \<Longrightarrow> square_free (f :: 'a poly) \<Longrightarrow> square_free (smult c f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c \<noteq> (0::'a); square_free f\<rbrakk> \<Longrightarrow> square_free (smult c f)
[PROOF STEP]
by (unfold square_free_def, insert dvd_smult_cancel[of _ c], auto)


[STATEMENT]
lemma path_connected_Ioi[simp]: "path_connected {a<..}" for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected {a<..}
[PROOF STEP]
by (simp add: convex_imp_path_connected)


[STATEMENT]
lemma nzrows_nth_not_zero:
  assumes "i < length (nzrows A)"
  shows "nzrows A ! i \<noteq> 0\<^sub>v (dim_col A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nzrows A ! i \<noteq> 0\<^sub>v (dim_col A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
i < length (nzrows A)

goal (1 subgoal):
 1. nzrows A ! i \<noteq> 0\<^sub>v (dim_col A)
[PROOF STEP]
unfolding nzrows_def
[PROOF STATE]
proof (prove)
using this:
i < length (filter (\<lambda>r. r \<noteq> 0\<^sub>v (dim_col A)) (rows A))

goal (1 subgoal):
 1. filter (\<lambda>r. r \<noteq> 0\<^sub>v (dim_col A)) (rows A) ! i \<noteq> 0\<^sub>v (dim_col A)
[PROOF STEP]
using nth_mem
[PROOF STATE]
proof (prove)
using this:
i < length (filter (\<lambda>r. r \<noteq> 0\<^sub>v (dim_col A)) (rows A))
?n < length ?xs \<Longrightarrow> ?xs ! ?n \<in> set ?xs

goal (1 subgoal):
 1. filter (\<lambda>r. r \<noteq> 0\<^sub>v (dim_col A)) (rows A) ! i \<noteq> 0\<^sub>v (dim_col A)
[PROOF STEP]
by force


[STATEMENT]
lemma wf_dlverts'_rec: "\<lbrakk>wf_dlverts' (Node r xs); t1 \<in> fst ` fset xs\<rbrakk> \<Longrightarrow> wf_dlverts' t1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_dlverts' (Node r xs); t1 \<in> fst ` fset xs\<rbrakk> \<Longrightarrow> wf_dlverts' t1
[PROOF STEP]
unfolding wf_dlverts'_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_dverts (Node r xs) \<and> [] \<notin> dverts (Node r xs) \<and> (\<forall>v1\<in>dverts (Node r xs). \<forall>v2\<in>dverts (Node r xs). set v1 \<inter> set v2 = {} \<or> v1 = v2); t1 \<in> fst ` fset xs\<rbrakk> \<Longrightarrow> wf_dverts t1 \<and> [] \<notin> dverts t1 \<and> (\<forall>v1\<in>dverts t1. \<forall>v2\<in>dverts t1. set v1 \<inter> set v2 = {} \<or> v1 = v2)
[PROOF STEP]
using wf_dverts_rec[of r xs t1] dverts_child_subseteq[of t1 xs]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>wf_dverts (Node r xs); t1 \<in> fst ` fset xs\<rbrakk> \<Longrightarrow> wf_dverts t1
t1 \<in> fst ` fset xs \<Longrightarrow> dverts t1 \<subseteq> dverts (Node ?r xs)

goal (1 subgoal):
 1. \<lbrakk>wf_dverts (Node r xs) \<and> [] \<notin> dverts (Node r xs) \<and> (\<forall>v1\<in>dverts (Node r xs). \<forall>v2\<in>dverts (Node r xs). set v1 \<inter> set v2 = {} \<or> v1 = v2); t1 \<in> fst ` fset xs\<rbrakk> \<Longrightarrow> wf_dverts t1 \<and> [] \<notin> dverts t1 \<and> (\<forall>v1\<in>dverts t1. \<forall>v2\<in>dverts t1. set v1 \<inter> set v2 = {} \<or> v1 = v2)
[PROOF STEP]
by blast


[STATEMENT]
lemma stake_siterate[simp]: "stake n (siterate f x) = map (\<lambda>n. (f^^n) x) [0 ..< n]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stake n (siterate f x) = map (\<lambda>n. (f ^^ n) x) [0..<n]
[PROOF STEP]
by (induct n arbitrary: x) (auto simp del: stake.simps(2) simp: stake_Suc)


[STATEMENT]
lemma sorted_list_of_set_image:
  assumes "mono_on A g" "inj_on g A"
  shows "(sorted_list_of_set (g ` A)) = map g (sorted_list_of_set A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
proof (cases "finite A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
 2. infinite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
finite A

goal (2 subgoals):
 1. finite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
 2. infinite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A
mono_on A g
inj_on g A

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
proof (induction "sorted_list_of_set A" arbitrary: A)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. \<lbrakk>[] = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
 2. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
[] = sorted_list_of_set A
finite A
mono_on A g
inj_on g A

goal (2 subgoals):
 1. \<And>A. \<lbrakk>[] = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
 2. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[] = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
[] = sorted_list_of_set A
finite A
mono_on A g
inj_on g A

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
using sorted_list_of_set_eq_Nil_iff
[PROOF STATE]
proof (prove)
using this:
[] = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
finite ?A \<Longrightarrow> (sorted_list_of_set ?A = []) = (?A = {})

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
case (Cons x xs A)
[PROOF STATE]
proof (state)
this:
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
have not_empty_A: "A \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<noteq> {}
[PROOF STEP]
using Cons sorted_list_of_set_eq_Nil_iff
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
finite ?A \<Longrightarrow> (sorted_list_of_set ?A = []) = (?A = {})

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

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
have *: "Min (g ` A) = g (Min A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min (g ` A) = g (Min A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Min (g ` A) = g (Min A)
[PROOF STEP]
have "g (Min A) \<le> g a" if "a \<in> A" for a
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g (Min A) \<le> g a
[PROOF STEP]
using that Cons Min_in Min_le not_empty_A
[PROOF STATE]
proof (prove)
using this:
a \<in> A
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
\<lbrakk>finite ?A; ?A \<noteq> {}\<rbrakk> \<Longrightarrow> Min ?A \<in> ?A
\<lbrakk>finite ?A; ?x \<in> ?A\<rbrakk> \<Longrightarrow> Min ?A \<le> ?x
A \<noteq> {}

goal (1 subgoal):
 1. g (Min A) \<le> g a
[PROOF STEP]
by (auto intro!: mono_onD[of _ g])
[PROOF STATE]
proof (state)
this:
?a \<in> A \<Longrightarrow> g (Min A) \<le> g ?a

goal (1 subgoal):
 1. Min (g ` A) = g (Min A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?a \<in> A \<Longrightarrow> g (Min A) \<le> g ?a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?a \<in> A \<Longrightarrow> g (Min A) \<le> g ?a

goal (1 subgoal):
 1. Min (g ` A) = g (Min A)
[PROOF STEP]
using Cons not_empty_A
[PROOF STATE]
proof (prove)
using this:
?a \<in> A \<Longrightarrow> g (Min A) \<le> g ?a
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
A \<noteq> {}

goal (1 subgoal):
 1. Min (g ` A) = g (Min A)
[PROOF STEP]
by (intro Min_eqI) auto
[PROOF STATE]
proof (state)
this:
Min (g ` A) = g (Min A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Min (g ` A) = g (Min A)

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
have "g ` A \<noteq> {}" "finite (g ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` A \<noteq> {} &&& finite (g ` A)
[PROOF STEP]
using Cons
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A

goal (1 subgoal):
 1. g ` A \<noteq> {} &&& finite (g ` A)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g ` A \<noteq> {}
finite (g ` A)

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g ` A \<noteq> {}
finite (g ` A)
[PROOF STEP]
have "(sorted_list_of_set (g ` A)) =
             Min (g ` A) # sorted_list_of_set ((g ` A) - {Min (g ` A)})"
[PROOF STATE]
proof (prove)
using this:
g ` A \<noteq> {}
finite (g ` A)

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = Min (g ` A) # sorted_list_of_set (g ` A - {Min (g ` A)})
[PROOF STEP]
by (auto simp add: sorted_list_of_set_Min_Cons)
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` A) = Min (g ` A) # sorted_list_of_set (g ` A - {Min (g ` A)})

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` A) = Min (g ` A) # sorted_list_of_set (g ` A - {Min (g ` A)})

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
have "(g ` A) - {Min (g ` A)} = g ` (A - {Min A})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` A - {Min (g ` A)} = g ` (A - {Min A})
[PROOF STEP]
using Cons Min_in not_empty_A *
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
\<lbrakk>finite ?A; ?A \<noteq> {}\<rbrakk> \<Longrightarrow> Min ?A \<in> ?A
A \<noteq> {}
Min (g ` A) = g (Min A)

goal (1 subgoal):
 1. g ` A - {Min (g ` A)} = g ` (A - {Min A})
[PROOF STEP]
by (subst inj_on_image_set_diff[of _ A]) auto
[PROOF STATE]
proof (state)
this:
g ` A - {Min (g ` A)} = g ` (A - {Min A})

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g ` A - {Min (g ` A)} = g ` (A - {Min A})

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
have "sorted_list_of_set (g ` (A - {Min A})) = map g (sorted_list_of_set (A - {Min A}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted_list_of_set (g ` (A - {Min A})) = map g (sorted_list_of_set (A - {Min A}))
[PROOF STEP]
using not_empty_A Cons mono_on_subset[of A _ "A - {Min A}"] inj_on_subset[of _ A "A - {Min A}"]
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
\<lbrakk>mono_on A ?f; A - {Min A} \<subseteq> A\<rbrakk> \<Longrightarrow> mono_on (A - {Min A}) ?f
\<lbrakk>inj_on ?f A; A - {Min A} \<subseteq> A\<rbrakk> \<Longrightarrow> inj_on ?f (A - {Min A})

goal (1 subgoal):
 1. sorted_list_of_set (g ` (A - {Min A})) = map g (sorted_list_of_set (A - {Min A}))
[PROOF STEP]
by (intro Cons) (auto simp add: sorted_list_of_set_Min_Cons)
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` (A - {Min A})) = map g (sorted_list_of_set (A - {Min A}))

goal (1 subgoal):
 1. \<And>a x A. \<lbrakk>\<And>A. \<lbrakk>x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A); a # x = sorted_list_of_set A; finite A; mono_on A g; inj_on g A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sorted_list_of_set (g ` A) = Min (g ` A) # map g (sorted_list_of_set (A - {Min A}))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
sorted_list_of_set (g ` A) = Min (g ` A) # map g (sorted_list_of_set (A - {Min A}))

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
using Cons not_empty_A *
[PROOF STATE]
proof (prove)
using this:
sorted_list_of_set (g ` A) = Min (g ` A) # map g (sorted_list_of_set (A - {Min A}))
\<lbrakk>xs = sorted_list_of_set ?A; finite ?A; mono_on ?A g; inj_on g ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (g ` ?A) = map g (sorted_list_of_set ?A)
x # xs = sorted_list_of_set A
finite A
mono_on A g
inj_on g A
A \<noteq> {}
Min (g ` A) = g (Min A)

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
by (auto simp add: sorted_list_of_set_Min_Cons)
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)

goal (1 subgoal):
 1. infinite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infinite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
infinite A

goal (1 subgoal):
 1. infinite A \<Longrightarrow> sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
infinite A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
infinite A

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
infinite A
mono_on A g
inj_on g A

goal (1 subgoal):
 1. sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)
[PROOF STEP]
by (simp add: finite_image_iff)
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (g ` A) = map g (sorted_list_of_set A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma uminus_mult_mat_vec[simp]: assumes v: "dim_vec v = dim_col (A :: 'a :: ring mat)"
  shows "- A *\<^sub>v v = - (A *\<^sub>v v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - A *\<^sub>v v = - (A *\<^sub>v v)
[PROOF STEP]
using v
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col A

goal (1 subgoal):
 1. - A *\<^sub>v v = - (A *\<^sub>v v)
[PROOF STEP]
by (intro eq_vecI, auto)


[STATEMENT]
lemma assoc_add_mat[simp]:
  "(A :: 'a :: monoid_add mat) \<in> carrier_mat nr nc \<Longrightarrow> B \<in> carrier_mat nr nc \<Longrightarrow> C \<in> carrier_mat nr nc
  \<Longrightarrow> (A + B) + C = A + (B + C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> carrier_mat nr nc; B \<in> carrier_mat nr nc; C \<in> carrier_mat nr nc\<rbrakk> \<Longrightarrow> A + B + C = A + (B + C)
[PROOF STEP]
by (intro eq_matI, auto simp: ac_simps)


[STATEMENT]
lemma right_unique_pred_set_conv[pred_set_conv]: "right_unique = single_valuedp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. right_unique = single_valuedp
[PROOF STEP]
unfolding right_unique_def single_valuedp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>R. \<forall>x y z. R x y \<longrightarrow> R x z \<longrightarrow> y = z) = (\<lambda>r. \<forall>x y. r x y \<longrightarrow> (\<forall>z. r x z \<longrightarrow> y = z))
[PROOF STEP]
by auto


[STATEMENT]
lemma closed_sub_consts: \<open>length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p
[PROOF STEP]
proof (induct cs arbitrary: k p)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>k p. length [] = k \<Longrightarrow> closed m (sub_consts [] p) = closed (m + k) p
 2. \<And>a cs k p. \<lbrakk>\<And>k p. length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p; length (a # cs) = k\<rbrakk> \<Longrightarrow> closed m (sub_consts (a # cs) p) = closed (m + k) p
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
length [] = k

goal (2 subgoals):
 1. \<And>k p. length [] = k \<Longrightarrow> closed m (sub_consts [] p) = closed (m + k) p
 2. \<And>a cs k p. \<lbrakk>\<And>k p. length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p; length (a # cs) = k\<rbrakk> \<Longrightarrow> closed m (sub_consts (a # cs) p) = closed (m + k) p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length [] = k
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length [] = k

goal (1 subgoal):
 1. closed m (sub_consts [] p) = closed (m + k) p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
closed m (sub_consts [] p) = closed (m + k) p

goal (1 subgoal):
 1. \<And>a cs k p. \<lbrakk>\<And>k p. length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p; length (a # cs) = k\<rbrakk> \<Longrightarrow> closed m (sub_consts (a # cs) p) = closed (m + k) p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a cs k p. \<lbrakk>\<And>k p. length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p; length (a # cs) = k\<rbrakk> \<Longrightarrow> closed m (sub_consts (a # cs) p) = closed (m + k) p
[PROOF STEP]
case (Cons c cs)
[PROOF STATE]
proof (state)
this:
length cs = ?k \<Longrightarrow> closed m (sub_consts cs ?p) = closed (m + ?k) ?p
length (c # cs) = k

goal (1 subgoal):
 1. \<And>a cs k p. \<lbrakk>\<And>k p. length cs = k \<Longrightarrow> closed m (sub_consts cs p) = closed (m + k) p; length (a # cs) = k\<rbrakk> \<Longrightarrow> closed m (sub_consts (a # cs) p) = closed (m + k) p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length cs = ?k \<Longrightarrow> closed m (sub_consts cs ?p) = closed (m + ?k) ?p
length (c # cs) = k
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length cs = ?k \<Longrightarrow> closed m (sub_consts cs ?p) = closed (m + ?k) ?p
length (c # cs) = k

goal (1 subgoal):
 1. closed m (sub_consts (c # cs) p) = closed (m + k) p
[PROOF STEP]
using closed_sub
[PROOF STATE]
proof (prove)
using this:
length cs = ?k \<Longrightarrow> closed m (sub_consts cs ?p) = closed (m + ?k) ?p
length (c # cs) = k
?k \<le> ?m \<Longrightarrow> closed (Suc ?m) ?p = closed ?m (?p[App ?c []/?k])

goal (1 subgoal):
 1. closed m (sub_consts (c # cs) p) = closed (m + k) p
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
closed m (sub_consts (c # cs) p) = closed (m + k) p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_map_graph:
  "finite A \<Longrightarrow> finite (map_graph f \<inter> (A \<times> UNIV))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> finite (map_graph f \<inter> A \<times> UNIV)
[PROOF STEP]
by(force simp add: map_graph_def
    dest!: finite_fun_graph[where f=f]
    intro!: finite_surj[where A="fun_graph f \<inter> (A \<times> UNIV)" and f="apsnd the"]
  )


[STATEMENT]
lemma card_non_empty_geq_one:"i \<noteq> \<emptyset> \<longleftrightarrow> |i| \<ge> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (i \<noteq> bot) = (1 \<le> |i|)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i \<noteq> bot \<Longrightarrow> 1 \<le> |i|
 2. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
assume "i \<noteq> \<emptyset>"
[PROOF STATE]
proof (state)
this:
i \<noteq> bot

goal (2 subgoals):
 1. i \<noteq> bot \<Longrightarrow> 1 \<le> |i|
 2. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
hence "Rep_nat_int i \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
i \<noteq> bot

goal (1 subgoal):
 1. Rep_nat_int i \<noteq> {}
[PROOF STEP]
by (metis Rep_nat_int_inverse bot_nat_int.rep_eq)
[PROOF STATE]
proof (state)
this:
Rep_nat_int i \<noteq> {}

goal (2 subgoals):
 1. i \<noteq> bot \<Longrightarrow> 1 \<le> |i|
 2. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
hence "card (Rep_nat_int i) > 0"
[PROOF STATE]
proof (prove)
using this:
Rep_nat_int i \<noteq> {}

goal (1 subgoal):
 1. 0 < card (Rep_nat_int i)
[PROOF STEP]
by (metis \<open>i \<noteq> \<emptyset>\<close> card_0_eq finite_atLeastAtMost gr0I rep_non_empty_means_seq)
[PROOF STATE]
proof (state)
this:
0 < card (Rep_nat_int i)

goal (2 subgoals):
 1. i \<noteq> bot \<Longrightarrow> 1 \<le> |i|
 2. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
thus "|i| \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
0 < card (Rep_nat_int i)

goal (1 subgoal):
 1. 1 \<le> |i|
[PROOF STEP]
by (simp add: card'_def)
[PROOF STATE]
proof (state)
this:
1 \<le> |i|

goal (1 subgoal):
 1. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
assume "|i| \<ge> 1"
[PROOF STATE]
proof (state)
this:
1 \<le> |i|

goal (1 subgoal):
 1. 1 \<le> |i| \<Longrightarrow> i \<noteq> bot
[PROOF STEP]
thus "i \<noteq>\<emptyset>"
[PROOF STATE]
proof (prove)
using this:
1 \<le> |i|

goal (1 subgoal):
 1. i \<noteq> bot
[PROOF STEP]
using card_empty_zero
[PROOF STATE]
proof (prove)
using this:
1 \<le> |i|
|bot| = 0

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sep_conj_sep_impl2:
  "\<lbrakk> (P ** Q) h; \<And>h. P h \<Longrightarrow> (Q \<longrightarrow>* R) h \<rbrakk> \<Longrightarrow> R h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(P \<and>* Q) h; \<And>h. P h \<Longrightarrow> (Q \<longrightarrow>* R) h\<rbrakk> \<Longrightarrow> R h
[PROOF STEP]
by (force dest: sep_implD elim: sep_conjE)


[STATEMENT]
lemma rel_restrict_trancl_mem:
  "(a,b) \<in> (rel_restrict A R)\<^sup>+ \<Longrightarrow> (a,b) \<in> rel_restrict (A\<^sup>+) R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a, b) \<in> (rel_restrict A R)\<^sup>+ \<Longrightarrow> (a, b) \<in> rel_restrict (A\<^sup>+) R
[PROOF STEP]
by (induction rule: trancl_induct) (auto simp add: rel_restrict_def)


[STATEMENT]
lemma Gcd_in:
  fixes A :: "nat set"
  assumes "\<And>a b. a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> gcd a b \<in> A"
  assumes "A \<noteq> {}"
  shows   "Gcd A \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gcd A \<in> A
[PROOF STEP]
proof (cases "A = {0}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A = {0} \<Longrightarrow> Gcd A \<in> A
 2. A \<noteq> {0} \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
A \<noteq> {0}

goal (2 subgoals):
 1. A = {0} \<Longrightarrow> Gcd A \<in> A
 2. A \<noteq> {0} \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?a \<in> A; ?b \<in> A\<rbrakk> \<Longrightarrow> gcd ?a ?b \<in> A
A \<noteq> {}
A \<noteq> {0}
[PROOF STEP]
obtain x where "x \<in> A" "x > 0"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> A; ?b \<in> A\<rbrakk> \<Longrightarrow> gcd ?a ?b \<in> A
A \<noteq> {}
A \<noteq> {0}

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> A; 0 < x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> A
0 < x

goal (2 subgoals):
 1. A = {0} \<Longrightarrow> Gcd A \<in> A
 2. A \<noteq> {0} \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
thus "Gcd A \<in> A"
[PROOF STATE]
proof (prove)
using this:
x \<in> A
0 < x

goal (1 subgoal):
 1. Gcd A \<in> A
[PROOF STEP]
proof (induction x rule: less_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>y. \<lbrakk>y < x; y \<in> A; 0 < y\<rbrakk> \<Longrightarrow> Gcd A \<in> A; x \<in> A; 0 < x\<rbrakk> \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
case (less x)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?y < x; ?y \<in> A; 0 < ?y\<rbrakk> \<Longrightarrow> Gcd A \<in> A
x \<in> A
0 < x

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>y. \<lbrakk>y < x; y \<in> A; 0 < y\<rbrakk> \<Longrightarrow> Gcd A \<in> A; x \<in> A; 0 < x\<rbrakk> \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gcd A \<in> A
[PROOF STEP]
proof (cases "x = Gcd A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> Gcd A

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
have "\<exists>y\<in>A. \<not>x dvd y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y\<in>A. \<not> x dvd y
[PROOF STEP]
using False less.prems
[PROOF STATE]
proof (prove)
using this:
x \<noteq> Gcd A
x \<in> A
0 < x

goal (1 subgoal):
 1. \<exists>y\<in>A. \<not> x dvd y
[PROOF STEP]
by (metis Gcd_dvd Gcd_greatest_nat gcd_nat.asym)
[PROOF STATE]
proof (state)
this:
\<exists>y\<in>A. \<not> x dvd y

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>y\<in>A. \<not> x dvd y
[PROOF STEP]
obtain y where y: "y \<in> A" "\<not>x dvd y"
[PROOF STATE]
proof (prove)
using this:
\<exists>y\<in>A. \<not> x dvd y

goal (1 subgoal):
 1. (\<And>y. \<lbrakk>y \<in> A; \<not> x dvd y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> A
\<not> x dvd y

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
have "gcd x y \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd x y \<in> A
[PROOF STEP]
by (rule assms(1)) (use \<open>x \<in> A\<close> y in auto)
[PROOF STATE]
proof (state)
this:
gcd x y \<in> A

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
gcd x y \<in> A

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
have "gcd x y < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd x y < x
[PROOF STEP]
using \<open>x > 0\<close> y
[PROOF STATE]
proof (prove)
using this:
0 < x
y \<in> A
\<not> x dvd y

goal (1 subgoal):
 1. gcd x y < x
[PROOF STEP]
by (metis gcd_dvd1 gcd_dvd2 nat_dvd_not_less nat_neq_iff)
[PROOF STATE]
proof (state)
this:
gcd x y < x

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
gcd x y < x

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
have "gcd x y > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < gcd x y
[PROOF STEP]
using \<open>x > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. 0 < gcd x y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < gcd x y

goal (2 subgoals):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
 2. x \<noteq> Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
gcd x y \<in> A
gcd x y < x
0 < gcd x y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
gcd x y \<in> A
gcd x y < x
0 < gcd x y

goal (1 subgoal):
 1. Gcd A \<in> A
[PROOF STEP]
using less.IH
[PROOF STATE]
proof (prove)
using this:
gcd x y \<in> A
gcd x y < x
0 < gcd x y
\<lbrakk>?y < x; ?y \<in> A; 0 < ?y\<rbrakk> \<Longrightarrow> Gcd A \<in> A

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

goal (1 subgoal):
 1. x = Gcd A \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
qed (use less in auto)
[PROOF STATE]
proof (state)
this:
Gcd A \<in> A

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Gcd A \<in> A

goal (1 subgoal):
 1. A = {0} \<Longrightarrow> Gcd A \<in> A
[PROOF STEP]
qed auto


[STATEMENT]
lemma mat_adj_eye [simp]:
  shows "mat_adj eye = eye"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_adj eye = eye
[PROOF STEP]
by (auto simp add: mat_adj_def mat_cnj_def)


[STATEMENT]
lemma integer_eqI:
  "int_of_integer k = int_of_integer l \<Longrightarrow> k = l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int_of_integer k = int_of_integer l \<Longrightarrow> k = l
[PROOF STEP]
using integer_eq_iff [of k l]
[PROOF STATE]
proof (prove)
using this:
(k = l) = (int_of_integer k = int_of_integer l)

goal (1 subgoal):
 1. int_of_integer k = int_of_integer l \<Longrightarrow> k = l
[PROOF STEP]
by simp


[STATEMENT]
lemma squash_idem:
  shows "squash (squash x) = squash x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. squash (squash x) = squash x
[PROOF STEP]
unfolding squash_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if 0 < (if (0::'a) < x then 1 else if x < (0::'a) then - 1 else 0) then 1 else if (if (0::'a) < x then 1 else if x < (0::'a) then - 1 else 0) < 0 then - 1 else 0) = (if (0::'a) < x then 1 else if x < (0::'a) then - 1 else 0)
[PROOF STEP]
by auto


[STATEMENT]
lemma angle_collinear: "angle a b c \<in> {0, pi} \<Longrightarrow> collinear {a, b, c}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. angle a b c \<in> {0, pi} \<Longrightarrow> collinear {a, b, c}
[PROOF STEP]
apply (unfold angle_def, drule vangle_collinear)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. collinear {0::'a, a - b, c - b} \<Longrightarrow> collinear {a, b, c}
[PROOF STEP]
apply (subst collinear_translate_iff[symmetric, of _ "-b"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. collinear {0::'a, a - b, c - b} \<Longrightarrow> collinear ((+) (- b) ` {a, b, c})
[PROOF STEP]
apply (auto simp: insert_commute)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma differentiable_on_scaleR [derivative_intros, simp]:
   "\<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. f x *\<^sub>R g x) differentiable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. f x *\<^sub>R g x) differentiable_on S
[PROOF STEP]
unfolding differentiable_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>S. f differentiable at x within S; \<forall>x\<in>S. g differentiable at x within S\<rbrakk> \<Longrightarrow> \<forall>x\<in>S. (\<lambda>x. f x *\<^sub>R g x) differentiable at x within S
[PROOF STEP]
by (blast intro: differentiable_scaleR)


[STATEMENT]
lemma supp_is_least_supports:
  fixes S :: "atom set"
  and   x :: "'a::pt"
  assumes  a1: "S supports x"
  and      a2: "finite S"
  and      a3: "\<And>S'. finite S' \<Longrightarrow> (S' supports x) \<Longrightarrow> S \<subseteq> S'"
  shows "(supp x) = S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp x = S
[PROOF STEP]
proof (rule equalityI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. supp x \<subseteq> S
 2. S \<subseteq> supp x
[PROOF STEP]
show "(supp x) \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp x \<subseteq> S
[PROOF STEP]
using a1 a2
[PROOF STATE]
proof (prove)
using this:
S supports x
finite S

goal (1 subgoal):
 1. supp x \<subseteq> S
[PROOF STEP]
by (rule supp_is_subset)
[PROOF STATE]
proof (state)
this:
supp x \<subseteq> S

goal (1 subgoal):
 1. S \<subseteq> supp x
[PROOF STEP]
with a2
[PROOF STATE]
proof (chain)
picking this:
finite S
supp x \<subseteq> S
[PROOF STEP]
have fin: "finite (supp x)"
[PROOF STATE]
proof (prove)
using this:
finite S
supp x \<subseteq> S

goal (1 subgoal):
 1. finite (supp x)
[PROOF STEP]
by (rule rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite (supp x)

goal (1 subgoal):
 1. S \<subseteq> supp x
[PROOF STEP]
have "(supp x) supports x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp x supports x
[PROOF STEP]
by (rule supp_supports)
[PROOF STATE]
proof (state)
this:
supp x supports x

goal (1 subgoal):
 1. S \<subseteq> supp x
[PROOF STEP]
with fin a3
[PROOF STATE]
proof (chain)
picking this:
finite (supp x)
\<lbrakk>finite ?S'; ?S' supports x\<rbrakk> \<Longrightarrow> S \<subseteq> ?S'
supp x supports x
[PROOF STEP]
show "S \<subseteq> supp x"
[PROOF STATE]
proof (prove)
using this:
finite (supp x)
\<lbrakk>finite ?S'; ?S' supports x\<rbrakk> \<Longrightarrow> S \<subseteq> ?S'
supp x supports x

goal (1 subgoal):
 1. S \<subseteq> supp x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
S \<subseteq> supp x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_path_split'[simp]:
      "is_path v (p1@(u,w,u')#p2) v'
        \<longleftrightarrow> is_path v p1 u \<and> (u,w,u')\<in>E \<and> is_path u' p2 v'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_path v (p1 @ (u, w, u') # p2) v' = (is_path v p1 u \<and> (u, w, u') \<in> E \<and> is_path u' p2 v')
[PROOF STEP]
by (auto simp add: is_path_split)


[STATEMENT]
lemma create_fsm_from_sets_surj :
  assumes "finite (UNIV :: 'a set)"
  and     "finite (UNIV :: 'b set)"
  and     "finite (UNIV :: 'c set)"
shows "surj (\<lambda>(q::'a,Q,X::'b set,Y::'c set,T) . create_fsm_from_sets q Q X Y T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. surj (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T) \<subseteq> UNIV
 2. UNIV \<subseteq> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
show "range (\<lambda>(q::'a,Q,X::'b set,Y::'c set,T) . create_fsm_from_sets q Q X Y T) \<subseteq> UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T) \<subseteq> UNIV
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T) \<subseteq> UNIV

goal (1 subgoal):
 1. UNIV \<subseteq> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
show "UNIV \<subseteq> range (\<lambda>(q::'a,Q,X::'b set,Y::'c set,T) . create_fsm_from_sets q Q X Y T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV \<subseteq> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
fix m
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
assume "m \<in> (UNIV :: ('a,'b,'c) fsm set)"
[PROOF STATE]
proof (state)
this:
m \<in> UNIV

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m \<in> UNIV
[PROOF STEP]
have "m = create_fsm_from_sets (initial m) (states m) (inputs m) (outputs m) (transitions m)"
[PROOF STATE]
proof (prove)
using this:
m \<in> UNIV

goal (1 subgoal):
 1. m = FSM.create_fsm_from_sets (FSM.initial m) (FSM.states m) (FSM.inputs m) (FSM.outputs m) (FSM.transitions m)
[PROOF STEP]
using create_fsm_from_self
[PROOF STATE]
proof (prove)
using this:
m \<in> UNIV
?m = FSM.create_fsm_from_sets (FSM.initial ?m) (FSM.states ?m) (FSM.inputs ?m) (FSM.outputs ?m) (FSM.transitions ?m)

goal (1 subgoal):
 1. m = FSM.create_fsm_from_sets (FSM.initial m) (FSM.states m) (FSM.inputs m) (FSM.outputs m) (FSM.transitions m)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m = FSM.create_fsm_from_sets (FSM.initial m) (FSM.states m) (FSM.inputs m) (FSM.outputs m) (FSM.transitions m)

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m = FSM.create_fsm_from_sets (FSM.initial m) (FSM.states m) (FSM.inputs m) (FSM.outputs m) (FSM.transitions m)
[PROOF STEP]
have "m = (\<lambda>(q::'a,Q,X::'b set,Y::'c set,T) . create_fsm_from_sets q Q X Y T) (initial m,states m,inputs m,outputs m,transitions m)"
[PROOF STATE]
proof (prove)
using this:
m = FSM.create_fsm_from_sets (FSM.initial m) (FSM.states m) (FSM.inputs m) (FSM.outputs m) (FSM.transitions m)

goal (1 subgoal):
 1. m = (case (FSM.initial m, FSM.states m, FSM.inputs m, FSM.outputs m, FSM.transitions m) of (q, Q, X, Y, T) \<Rightarrow> FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
m = (case (FSM.initial m, FSM.states m, FSM.inputs m, FSM.outputs m, FSM.transitions m) of (q, Q, X, Y, T) \<Rightarrow> FSM.create_fsm_from_sets q Q X Y T)

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m = (case (FSM.initial m, FSM.states m, FSM.inputs m, FSM.outputs m, FSM.transitions m) of (q, Q, X, Y, T) \<Rightarrow> FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
show "m \<in> range (\<lambda>(q::'a,Q,X::'b set,Y::'c set,T) . create_fsm_from_sets q Q X Y T)"
[PROOF STATE]
proof (prove)
using this:
m = (case (FSM.initial m, FSM.states m, FSM.inputs m, FSM.outputs m, FSM.transitions m) of (q, Q, X, Y, T) \<Rightarrow> FSM.create_fsm_from_sets q Q X Y T)

goal (1 subgoal):
 1. m \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m \<in> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
UNIV \<subseteq> range (\<lambda>(q, Q, X, Y, T). FSM.create_fsm_from_sets q Q X Y T)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bounded_bilinear_mult: "bounded_bilinear ((*) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a::real_normed_algebra)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_bilinear (*)
[PROOF STEP]
proof (rule bounded_bilinear.intro)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>a a' b. (a + a') * b = a * b + a' * b
 2. \<And>a b b'. a * (b + b') = a * b + a * b'
 3. \<And>r a b. r *\<^sub>R a * b = r *\<^sub>R (a * b)
 4. \<And>a r b. a * r *\<^sub>R b = r *\<^sub>R (a * b)
 5. \<exists>K. \<forall>a b. norm (a * b) \<le> norm a * norm b * K
[PROOF STEP]
show "\<exists>K. \<forall>a b::'a. norm (a * b) \<le> norm a * norm b * K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>K. \<forall>a b. norm (a * b) \<le> norm a * norm b * K
[PROOF STEP]
by (rule_tac x=1 in exI) (simp add: norm_mult_ineq)
[PROOF STATE]
proof (state)
this:
\<exists>K. \<forall>a b. norm (a * b) \<le> norm a * norm b * K

goal (4 subgoals):
 1. \<And>a a' b. (a + a') * b = a * b + a' * b
 2. \<And>a b b'. a * (b + b') = a * b + a * b'
 3. \<And>r a b. r *\<^sub>R a * b = r *\<^sub>R (a * b)
 4. \<And>a r b. a * r *\<^sub>R b = r *\<^sub>R (a * b)
[PROOF STEP]
qed (auto simp: algebra_simps)


[STATEMENT]
lemma changes_nonneg: "0 \<le> changes xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> changes xs
[PROOF STEP]
apply (induction xs rule: changes.induct)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. 0 \<le> changes []
 2. \<And>uu_. 0 \<le> changes [uu_]
 3. \<And>x1 x2 xs. \<lbrakk>x1 * x2 < (0::'a) \<Longrightarrow> 0 \<le> changes (x2 # xs); \<lbrakk>\<not> x1 * x2 < (0::'a); x2 = (0::'a)\<rbrakk> \<Longrightarrow> 0 \<le> changes (x1 # xs); \<lbrakk>\<not> x1 * x2 < (0::'a); x2 \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> 0 \<le> changes (x2 # xs)\<rbrakk> \<Longrightarrow> 0 \<le> changes (x1 # x2 # xs)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma (in finite_measure) nn_integral_indicator_neq_top:
  "f -` A \<in> sets M \<Longrightarrow> (\<integral>\<^sup>+ x. indicator A (f x) \<partial>M) \<noteq> \<top>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f -` A \<in> sets M \<Longrightarrow> \<integral>\<^sup>+ x. indicator A (f x) \<partial>M \<noteq> \<top>
[PROOF STEP]
by(drule nn_integral_indicator_neq_infty) simp


[STATEMENT]
lemma chain_boundary_chain_map:
  assumes "singular_chain p X c"
  shows "chain_boundary p (chain_map p g c) = chain_map (p - Suc 0) g (chain_boundary p c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chain_boundary p (chain_map p g c) = chain_map (p - Suc 0) g (chain_boundary p c)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
singular_chain p X c

goal (1 subgoal):
 1. chain_boundary p (chain_map p g c) = chain_map (p - Suc 0) g (chain_boundary p c)
[PROOF STEP]
unfolding singular_chain_def
[PROOF STATE]
proof (prove)
using this:
Poly_Mapping.keys c \<subseteq> singular_simplex_set p X

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

goal (3 subgoals):
 1. chain_boundary p (chain_map p g 0) = chain_map (p - Suc 0) g (chain_boundary p 0)
 2. \<And>x. x \<in> singular_simplex_set p X \<Longrightarrow> chain_boundary p (chain_map p g (frag_of x)) = chain_map (p - Suc 0) g (chain_boundary p (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary p (chain_map p g a) = chain_map (p - Suc 0) g (chain_boundary p a); chain_boundary p (chain_map p g b) = chain_map (p - Suc 0) g (chain_boundary p b)\<rbrakk> \<Longrightarrow> chain_boundary p (chain_map p g (a - b)) = chain_map (p - Suc 0) g (chain_boundary p (a - b))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> singular_simplex_set p X
[PROOF STEP]
have "singular_face p i (simplex_map p g x) = simplex_map (p - Suc 0) g (singular_face p i x)"
    if "0 \<le> i" "i \<le> p" "p \<noteq> 0" for i
[PROOF STATE]
proof (prove)
using this:
x \<in> singular_simplex_set p X

goal (1 subgoal):
 1. singular_face p i (simplex_map p g x) = simplex_map (p - Suc 0) g (singular_face p i x)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> singular_simplex_set p X
0 \<le> i
i \<le> p
p \<noteq> 0

goal (1 subgoal):
 1. singular_face p i (simplex_map p g x) = simplex_map (p - Suc 0) g (singular_face p i x)
[PROOF STEP]
by (fastforce simp add: singular_face_def simplex_map_def simplical_face_in_standard_simplex)
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?i; ?i \<le> p; p \<noteq> 0\<rbrakk> \<Longrightarrow> singular_face p ?i (simplex_map p g x) = simplex_map (p - Suc 0) g (singular_face p ?i x)

goal (3 subgoals):
 1. chain_boundary p (chain_map p g 0) = chain_map (p - Suc 0) g (chain_boundary p 0)
 2. \<And>x. x \<in> singular_simplex_set p X \<Longrightarrow> chain_boundary p (chain_map p g (frag_of x)) = chain_map (p - Suc 0) g (chain_boundary p (frag_of x))
 3. \<And>a b. \<lbrakk>chain_boundary p (chain_map p g a) = chain_map (p - Suc 0) g (chain_boundary p a); chain_boundary p (chain_map p g b) = chain_map (p - Suc 0) g (chain_boundary p b)\<rbrakk> \<Longrightarrow> chain_boundary p (chain_map p g (a - b)) = chain_map (p - Suc 0) g (chain_boundary p (a - b))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?i; ?i \<le> p; p \<noteq> 0\<rbrakk> \<Longrightarrow> singular_face p ?i (simplex_map p g x) = simplex_map (p - Suc 0) g (singular_face p ?i x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?i; ?i \<le> p; p \<noteq> 0\<rbrakk> \<Longrightarrow> singular_face p ?i (simplex_map p g x) = simplex_map (p - Suc 0) g (singular_face p ?i x)

goal (1 subgoal):
 1. chain_boundary p (chain_map p g (frag_of x)) = chain_map (p - Suc 0) g (chain_boundary p (frag_of x))
[PROOF STEP]
by (auto simp: chain_boundary_of chain_map_sum)
[PROOF STATE]
proof (state)
this:
chain_boundary p (chain_map p g (frag_of x)) = chain_map (p - Suc 0) g (chain_boundary p (frag_of x))

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

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

goal (1 subgoal):
 1. chain_boundary p (chain_map p g (a - b)) = chain_map (p - Suc 0) g (chain_boundary p (a - b))
[PROOF STEP]
by (simp add: chain_boundary_diff chain_map_diff)
[PROOF STATE]
proof (state)
this:
chain_boundary p (chain_map p g (a - b)) = chain_map (p - Suc 0) g (chain_boundary p (a - b))

goal (1 subgoal):
 1. chain_boundary p (chain_map p g 0) = chain_map (p - Suc 0) g (chain_boundary p 0)
[PROOF STEP]
qed auto


[STATEMENT]
lemma interior_Iic:
  fixes x :: "'a ::{dense_linorder,linorder_topology}"
  assumes "x < b"
  shows "interior {.. x} = {..< x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interior {..x} = {..<x}
[PROOF STEP]
proof (rule interior_unique)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. {..<x} \<subseteq> {..x}
 2. open {..<x}
 3. \<And>T'. \<lbrakk>T' \<subseteq> {..x}; open T'\<rbrakk> \<Longrightarrow> T' \<subseteq> {..<x}
[PROOF STEP]
fix T
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. {..<x} \<subseteq> {..x}
 2. open {..<x}
 3. \<And>T'. \<lbrakk>T' \<subseteq> {..x}; open T'\<rbrakk> \<Longrightarrow> T' \<subseteq> {..<x}
[PROOF STEP]
assume "T \<subseteq> {.. x}" "open T"
[PROOF STATE]
proof (state)
this:
T \<subseteq> {..x}
open T

goal (3 subgoals):
 1. {..<x} \<subseteq> {..x}
 2. open {..<x}
 3. \<And>T'. \<lbrakk>T' \<subseteq> {..x}; open T'\<rbrakk> \<Longrightarrow> T' \<subseteq> {..<x}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
T \<subseteq> {..x}
open T

goal (3 subgoals):
 1. {..<x} \<subseteq> {..x}
 2. open {..<x}
 3. \<And>T'. \<lbrakk>T' \<subseteq> {..x}; open T'\<rbrakk> \<Longrightarrow> T' \<subseteq> {..<x}
[PROOF STEP]
have "x \<notin> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> T
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> T \<Longrightarrow> False
[PROOF STEP]
assume "x \<in> T"
[PROOF STATE]
proof (state)
this:
x \<in> T

goal (1 subgoal):
 1. x \<in> T \<Longrightarrow> False
[PROOF STEP]
obtain y where "x < y" "{x ..< y} \<subseteq> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y. \<lbrakk>x < y; {x..<y} \<subseteq> T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using open_right[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>x < b\<close>]
[PROOF STATE]
proof (prove)
using this:
\<exists>b>x. {x..<b} \<subseteq> T

goal (1 subgoal):
 1. (\<And>y. \<lbrakk>x < y; {x..<y} \<subseteq> T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x < y
{x..<y} \<subseteq> T

goal (1 subgoal):
 1. x \<in> T \<Longrightarrow> False
[PROOF STEP]
with dense[OF \<open>x < y\<close>]
[PROOF STATE]
proof (chain)
picking this:
\<exists>z>x. z < y
x < y
{x..<y} \<subseteq> T
[PROOF STEP]
obtain z where "z \<in> T" "x < z"
[PROOF STATE]
proof (prove)
using this:
\<exists>z>x. z < y
x < y
{x..<y} \<subseteq> T

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> T; x < z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: subset_eq Ball_def less_le)
[PROOF STATE]
proof (state)
this:
z \<in> T
x < z

goal (1 subgoal):
 1. x \<in> T \<Longrightarrow> False
[PROOF STEP]
with \<open>T \<subseteq> {.. x}\<close>
[PROOF STATE]
proof (chain)
picking this:
T \<subseteq> {..x}
z \<in> T
x < z
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
T \<subseteq> {..x}
z \<in> T
x < z

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x \<notin> T

goal (3 subgoals):
 1. {..<x} \<subseteq> {..x}
 2. open {..<x}
 3. \<And>T'. \<lbrakk>T' \<subseteq> {..x}; open T'\<rbrakk> \<Longrightarrow> T' \<subseteq> {..<x}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
T \<subseteq> {..x}
open T
x \<notin> T
[PROOF STEP]
show "T \<subseteq> {..< x}"
[PROOF STATE]
proof (prove)
using this:
T \<subseteq> {..x}
open T
x \<notin> T

goal (1 subgoal):
 1. T \<subseteq> {..<x}
[PROOF STEP]
by (auto simp: subset_eq less_le)
[PROOF STATE]
proof (state)
this:
T \<subseteq> {..<x}

goal (2 subgoals):
 1. {..<x} \<subseteq> {..x}
 2. open {..<x}
[PROOF STEP]
qed auto


[STATEMENT]
lemma odd_real_root_unique: "odd n \<Longrightarrow> y ^ n = x \<Longrightarrow> root n x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>odd n; y ^ n = x\<rbrakk> \<Longrightarrow> root n x = y
[PROOF STEP]
by (erule subst, rule odd_real_root_power_cancel)


[STATEMENT]
lemma natToVertexList_length[simp]: "incrIndexList es (length es) (length (vertices f)) \<Longrightarrow>
length (natToVertexList v f es) = length es"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. incrIndexList es |es| |vertices f| \<Longrightarrow> |natToVertexList v f es| = |es|
[PROOF STEP]
apply (case_tac es)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>incrIndexList es |es| |vertices f|; es = []\<rbrakk> \<Longrightarrow> |natToVertexList v f es| = |es|
 2. \<And>a list. \<lbrakk>incrIndexList es |es| |vertices f|; es = a # list\<rbrakk> \<Longrightarrow> |natToVertexList v f es| = |es|
[PROOF STEP]
by simp_all


[STATEMENT]
lemma encode_config:
  "encode_config (ss, rv) = prod_encode (list_encode (map encode_frame ss), encode_option rv)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. encode_config (ss, rv) = prod_encode (Partial_Recursive.list_encode (map encode_frame ss), encode_option rv)
[PROOF STEP]
unfolding encode_config_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod_encode (Partial_Recursive.list_encode (map encode_frame (fst (ss, rv))), encode_option (snd (ss, rv))) = prod_encode (Partial_Recursive.list_encode (map encode_frame ss), encode_option rv)
[PROOF STEP]
by simp


[STATEMENT]
lemma index_eq_nextl_le_states: "card (UNIV // eq_nextl) \<le> card (states M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (UNIV // eq_nextl) \<le> card (states M)
[PROOF STEP]
apply (rule surj_card_le [where f = left_lang, OF finite])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV // eq_nextl \<subseteq> left_lang ` states M
[PROOF STEP]
apply (auto simp: quotient_def eq_nextl_class_in_left_lang_im)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma max_prop:
  fixes XS::"('a BC) set"
  assumes "XS \<noteq> {}"
    and "finite XS"
  shows "MAX XS \<in> XS"
    and "\<forall>b'\<in>XS. length b' \<le> length (MAX XS)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MAX XS \<in> XS &&& \<forall>b'\<in>XS. length b' \<le> length (MAX XS)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. MAX XS \<in> XS
 2. \<forall>b'\<in>XS. length b' \<le> length (MAX XS)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
XS \<noteq> {}
finite XS
[PROOF STEP]
have "\<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs"
[PROOF STATE]
proof (prove)
using this:
XS \<noteq> {}
finite XS

goal (1 subgoal):
 1. \<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs
[PROOF STEP]
using max_ex[of XS]
[PROOF STATE]
proof (prove)
using this:
XS \<noteq> {}
finite XS
\<lbrakk>XS \<noteq> {}; finite XS\<rbrakk> \<Longrightarrow> \<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs

goal (1 subgoal):
 1. \<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs

goal (2 subgoals):
 1. MAX XS \<in> XS
 2. \<forall>b'\<in>XS. length b' \<le> length (MAX XS)
[PROOF STEP]
with MAX_def[of XS]
[PROOF STATE]
proof (chain)
picking this:
MAX XS = (SOME b. max_cond XS b)
\<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs
[PROOF STEP]
show "MAX XS \<in> XS" and "\<forall>b'\<in>XS. length b' \<le> length (MAX XS)"
[PROOF STATE]
proof (prove)
using this:
MAX XS = (SOME b. max_cond XS b)
\<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs

goal (1 subgoal):
 1. MAX XS \<in> XS &&& \<forall>b'\<in>XS. length b' \<le> length (MAX XS)
[PROOF STEP]
using someI_ex[of "\<lambda>b. b \<in> XS \<and> (\<forall>b'\<in>XS. length b' \<le> length b)"]
[PROOF STATE]
proof (prove)
using this:
MAX XS = (SOME b. max_cond XS b)
\<exists>xs\<in>XS. \<forall>ys\<in>XS. length ys \<le> length xs
\<exists>x. max_cond XS x \<Longrightarrow> max_cond XS (SOME x. max_cond XS x)

goal (1 subgoal):
 1. MAX XS \<in> XS &&& \<forall>b'\<in>XS. length b' \<le> length (MAX XS)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
MAX XS \<in> XS
\<forall>b'\<in>XS. length b' \<le> length (MAX XS)

goal:
No subgoals!
[PROOF STEP]
qed