[STATEMENT]
lemma [autoref_op_pat]:
    "(\<forall>i<u. P i) \<equiv> OP List.all_interval_nat P 0 u"
    "(\<forall>i\<le>u. P i) \<equiv> OP List.all_interval_nat P 0 (Suc u)"
    "(\<forall>i<u. l\<le>i \<longrightarrow> P i) \<equiv> OP List.all_interval_nat P l u"
    "(\<forall>i\<le>u. l\<le>i \<longrightarrow> P i) \<equiv> OP List.all_interval_nat P l (Suc u)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<forall>i<u. P i \<equiv> OP List.all_interval_nat P 0 u) &&& \<forall>i\<le>u. P i \<equiv> OP List.all_interval_nat P 0 (Suc u)) &&& (\<forall>i<u. l \<le> i \<longrightarrow> P i \<equiv> OP List.all_interval_nat P l u) &&& \<forall>i\<le>u. l \<le> i \<longrightarrow> P i \<equiv> OP List.all_interval_nat P l (Suc u)
[PROOF STEP]
by (auto intro!: eq_reflection simp: List.all_interval_nat_def)


[STATEMENT]
lemma ac_inv:
  assumes "x \<in> nonzero Q\<^sub>p"
  assumes "n > 0"
  shows "ac n (inv x) = inv\<^bsub>Zp_res_ring n\<^esub> (ac n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x
[PROOF STEP]
have "x \<otimes> inv x = \<one>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<div> x) = \<one>
[PROOF STEP]
by (simp add: Qp.monoid_axioms Units_eq_nonzero assms(1) monoid.Units_r_inv)
[PROOF STATE]
proof (state)
this:
(x \<div> x) = \<one>

goal (1 subgoal):
 1. ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x \<div> x) = \<one>
[PROOF STEP]
have "ac n (x \<otimes> inv x) = \<one>\<^bsub>Zp_res_ring n\<^esub>"
[PROOF STATE]
proof (prove)
using this:
(x \<div> x) = \<one>

goal (1 subgoal):
 1. ac n (x \<div> x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>
[PROOF STEP]
by (simp add: \<open>(x \<div> x) = \<one>\<close> ac_one' assms(2))
[PROOF STATE]
proof (state)
this:
ac n (x \<div> x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>

goal (1 subgoal):
 1. ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ac n (x \<div> x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>
[PROOF STEP]
have "ac n x \<otimes>\<^bsub>Zp_res_ring n\<^esub> ac n (inv x) = \<one>\<^bsub>Zp_res_ring n\<^esub>"
[PROOF STATE]
proof (prove)
using this:
ac n (x \<div> x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>

goal (1 subgoal):
 1. ac n x \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> ac n (inv x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>
[PROOF STEP]
using Units_eq_nonzero Units_inverse_Qp ac_mult' assms(1)
[PROOF STATE]
proof (prove)
using this:
ac n (x \<div> x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>
Units Q\<^sub>p = nonzero Q\<^sub>p
?u \<in> Units Q\<^sub>p \<Longrightarrow> inv ?u \<in> Units Q\<^sub>p
\<lbrakk>?x \<in> nonzero Q\<^sub>p; ?y \<in> nonzero Q\<^sub>p\<rbrakk> \<Longrightarrow> ac ?n (?x \<otimes> ?y) = ac ?n ?x \<otimes>\<^bsub>residue_ring (p ^ ?n)\<^esub> ac ?n ?y
x \<in> nonzero Q\<^sub>p

goal (1 subgoal):
 1. ac n x \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> ac n (inv x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
ac n x \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> ac n (inv x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>

goal (1 subgoal):
 1. ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ac n x \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> ac n (inv x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ac n x \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> ac n (inv x) = \<one>\<^bsub>residue_ring (p ^ n)\<^esub>

goal (1 subgoal):
 1. ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x
[PROOF STEP]
by (metis R_comm_monoid ac_in_res_ring assms(1) assms(2) comm_monoid.comm_inv_char nonzero_inverse_Qp)
[PROOF STATE]
proof (state)
this:
ac n (inv x) = inv\<^bsub>residue_ring (p ^ n)\<^esub> ac n x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma and_mask_eq_iff_shiftr_0:
  "(w AND mask n = w) = (w >> n = 0)"
  for w :: \<open>'a::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (w AND mask n = w) = (w >> n = 0)
[PROOF STEP]
by (simp flip: take_bit_eq_mask add: shiftr_def take_bit_eq_self_iff_drop_bit_eq_0)


[STATEMENT]
lemma star_conv_concat: "star A = {concat ws|ws. set ws \<subseteq> A & [] \<notin> set ws}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. star A = {concat ws |ws. set ws \<subseteq> A \<and> [] \<notin> set ws}
[PROOF STEP]
by (fastforce simp: in_star_iff_concat)


[STATEMENT]
lemma rsquarefree_gcd_pderiv:
  fixes p::"'a::{factorial_ring_gcd,semiring_gcd_mult_normalize,semiring_char_0} poly"
  assumes "p\<noteq>0"
  shows "rsquarefree (p div (gcd p (pderiv p)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
proof (cases "pderiv p = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. pderiv p = 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
 2. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
pderiv p = 0

goal (2 subgoals):
 1. pderiv p = 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
 2. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
have "poly (unit_factor p) x \<noteq>0" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (unit_factor p) x \<noteq> (0::'a)
[PROOF STEP]
using unit_factor_is_unit[OF \<open>p\<noteq>0\<close>]
[PROOF STATE]
proof (prove)
using this:
is_unit (unit_factor p)

goal (1 subgoal):
 1. poly (unit_factor p) x \<noteq> (0::'a)
[PROOF STEP]
by (meson assms dvd_trans order_decomp poly_eq_0_iff_dvd unit_factor_dvd)
[PROOF STATE]
proof (state)
this:
poly (unit_factor p) ?x \<noteq> (0::'a)

goal (2 subgoals):
 1. pderiv p = 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
 2. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
poly (unit_factor p) ?x \<noteq> (0::'a)
[PROOF STEP]
have "order x (unit_factor p) = 0" for x
[PROOF STATE]
proof (prove)
using this:
poly (unit_factor p) ?x \<noteq> (0::'a)

goal (1 subgoal):
 1. order x (unit_factor p) = 0
[PROOF STEP]
using order_0I
[PROOF STATE]
proof (prove)
using this:
poly (unit_factor p) ?x \<noteq> (0::'a)
poly ?p ?a \<noteq> (0::?'a) \<Longrightarrow> order ?a ?p = 0

goal (1 subgoal):
 1. order x (unit_factor p) = 0
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
order ?x (unit_factor p) = 0

goal (2 subgoals):
 1. pderiv p = 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
 2. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
order ?x (unit_factor p) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
order ?x (unit_factor p) = 0

goal (1 subgoal):
 1. rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
using True \<open>p\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
order ?x (unit_factor p) = 0
pderiv p = 0
p \<noteq> 0

goal (1 subgoal):
 1. rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
unfolding rsquarefree_def
[PROOF STATE]
proof (prove)
using this:
order ?x (unit_factor p) = 0
pderiv p = 0
p \<noteq> 0

goal (1 subgoal):
 1. p div gcd p (pderiv p) \<noteq> 0 \<and> (\<forall>a. order a (p div gcd p (pderiv p)) = 0 \<or> order a (p div gcd p (pderiv p)) = 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rsquarefree (p div gcd p (pderiv p))

goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
pderiv p \<noteq> 0

goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
define q where "q = p div (gcd p (pderiv p))"
[PROOF STATE]
proof (state)
this:
q = p div gcd p (pderiv p)

goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
have "q\<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q \<noteq> 0
[PROOF STEP]
unfolding q_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p div gcd p (pderiv p) \<noteq> 0
[PROOF STEP]
by (simp add: assms dvd_div_eq_0_iff)
[PROOF STATE]
proof (state)
this:
q \<noteq> 0

goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
have order_pq:"order x p = order x q + min (order x p) (order x (pderiv p))"
    for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order x p = order x q + min (order x p) (order x (pderiv p))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. order x p = order x q + min (order x p) (order x (pderiv p))
[PROOF STEP]
have *:"p = q * gcd p (pderiv p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = q * gcd p (pderiv p)
[PROOF STEP]
unfolding q_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = p div gcd p (pderiv p) * gcd p (pderiv p)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
p = q * gcd p (pderiv p)

goal (1 subgoal):
 1. order x p = order x q + min (order x p) (order x (pderiv p))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order x p = order x q + min (order x p) (order x (pderiv p))
[PROOF STEP]
apply (subst *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order x (q * gcd p (pderiv p)) = order x q + min (order x p) (order x (pderiv p))
[PROOF STEP]
using \<open>q\<noteq>0\<close> \<open>p\<noteq>0\<close> \<open>pderiv p\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
q \<noteq> 0
p \<noteq> 0
pderiv p \<noteq> 0

goal (1 subgoal):
 1. order x (q * gcd p (pderiv p)) = order x q + min (order x p) (order x (pderiv p))
[PROOF STEP]
by (simp add:order_mult order_gcd)
[PROOF STATE]
proof (state)
this:
order x p = order x q + min (order x p) (order x (pderiv p))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
order ?x p = order ?x q + min (order ?x p) (order ?x (pderiv p))

goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
have "order x q = 0 \<or> order x q=1" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order x q = 0 \<or> order x q = 1
[PROOF STEP]
proof (cases "poly p x=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly p x = (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
 2. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
poly p x = (0::'a)

goal (2 subgoals):
 1. poly p x = (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
 2. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
from order_pderiv[OF \<open>p\<noteq>0\<close> this]
[PROOF STATE]
proof (chain)
picking this:
order x p = Suc (order x (pderiv p))
[PROOF STEP]
have "order x p = order x (pderiv p) + 1"
[PROOF STATE]
proof (prove)
using this:
order x p = Suc (order x (pderiv p))

goal (1 subgoal):
 1. order x p = order x (pderiv p) + 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
order x p = order x (pderiv p) + 1

goal (2 subgoals):
 1. poly p x = (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
 2. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
order x p = order x (pderiv p) + 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
order x p = order x (pderiv p) + 1

goal (1 subgoal):
 1. order x q = 0 \<or> order x q = 1
[PROOF STEP]
using order_pq[of x]
[PROOF STATE]
proof (prove)
using this:
order x p = order x (pderiv p) + 1
order x p = order x q + min (order x p) (order x (pderiv p))

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

goal (1 subgoal):
 1. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
poly p x \<noteq> (0::'a)

goal (1 subgoal):
 1. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
poly p x \<noteq> (0::'a)
[PROOF STEP]
have "order x p = 0"
[PROOF STATE]
proof (prove)
using this:
poly p x \<noteq> (0::'a)

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

goal (1 subgoal):
 1. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
order x p = 0
[PROOF STEP]
have "order x q = 0"
[PROOF STATE]
proof (prove)
using this:
order x p = 0

goal (1 subgoal):
 1. order x q = 0
[PROOF STEP]
using order_pq[of x]
[PROOF STATE]
proof (prove)
using this:
order x p = 0
order x p = order x q + min (order x p) (order x (pderiv p))

goal (1 subgoal):
 1. order x q = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
order x q = 0

goal (1 subgoal):
 1. poly p x \<noteq> (0::'a) \<Longrightarrow> order x q = 0 \<or> order x q = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
order x q = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
order x q = 0

goal (1 subgoal):
 1. order x q = 0 \<or> order x q = 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
order x q = 0 \<or> order x q = 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
order ?x q = 0 \<or> order ?x q = 1

goal (1 subgoal):
 1. pderiv p \<noteq> 0 \<Longrightarrow> rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
order ?x q = 0 \<or> order ?x q = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
order ?x q = 0 \<or> order ?x q = 1

goal (1 subgoal):
 1. rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
using \<open>q\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
order ?x q = 0 \<or> order ?x q = 1
q \<noteq> 0

goal (1 subgoal):
 1. rsquarefree (p div gcd p (pderiv p))
[PROOF STEP]
unfolding rsquarefree_def q_def
[PROOF STATE]
proof (prove)
using this:
order ?x (p div gcd p (pderiv p)) = 0 \<or> order ?x (p div gcd p (pderiv p)) = 1
p div gcd p (pderiv p) \<noteq> 0

goal (1 subgoal):
 1. p div gcd p (pderiv p) \<noteq> 0 \<and> (\<forall>a. order a (p div gcd p (pderiv p)) = 0 \<or> order a (p div gcd p (pderiv p)) = 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rsquarefree (p div gcd p (pderiv p))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma glb_above: "S >>| z \<Longrightarrow> x \<sqsubseteq> glb S \<longleftrightarrow> S >| x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S >>| z \<Longrightarrow> (x \<sqsubseteq> \<Sqinter>S) = S >| x
[PROOF STEP]
by (metis glb_eqI is_glb_above_iff)


[STATEMENT]
lemma iprev_nth_iLast_Suc: "(\<ominus> t (I \<leftarrow> n) I. P t) = P (I \<leftarrow> Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. iLast (I \<leftarrow> n) I P = P (I \<leftarrow> Suc n)
[PROOF STEP]
by (simp add: iLast_def)


[STATEMENT]
lemma ac_p_nat_pow_factor:
  assumes "m > 0"
  assumes "a \<in> nonzero Q\<^sub>p"
  shows "ac m ((\<pp> [^] (n::nat)) \<otimes> a) = ac m a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ac m (\<pp> [^] n \<otimes> a) = ac m a
[PROOF STEP]
using angular_component_p_nat_pow_factor assms  ac_def
[PROOF STATE]
proof (prove)
using this:
?a \<in> nonzero Q\<^sub>p \<Longrightarrow> angular_component (\<pp> [^] ?n \<otimes> ?a) = angular_component ?a
0 < m
a \<in> nonzero Q\<^sub>p
ac ?n ?x = (if ?x = \<zero> then 0 else angular_component ?x ?n)

goal (1 subgoal):
 1. ac m (\<pp> [^] n \<otimes> a) = ac m a
[PROOF STEP]
by (metis (no_types, lifting) Qp.field_axioms Qp_nat_pow_nonzero Qp.nonzero_memE
      Qp.nonzero_memE Ring.integral p_nonzero)


[STATEMENT]
lemma r2f_comp_pres: "\<F> (R ; S) = \<F> R \<circ>\<^sub>K \<F> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<F> (R ; S) = \<F> R \<circ>\<^sub>K \<F> S
[PROOF STEP]
unfolding fun_eq_iff r2f_def kcomp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. ((``) (R ; S) \<circ> \<eta>) x = (\<mu> \<circ> \<P> ((``) S \<circ> \<eta>) \<circ> ((``) R \<circ> \<eta>)) x
[PROOF STEP]
by force


[STATEMENT]
lemma convex_measurable:
  fixes A :: "'a :: euclidean_space set"
  shows "X \<in> borel_measurable M \<Longrightarrow> X ` space M \<subseteq> A \<Longrightarrow> open A \<Longrightarrow> convex_on A q \<Longrightarrow>
    (\<lambda>x. q (X x)) \<in> borel_measurable M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<in> borel_measurable M; X ` space M \<subseteq> A; open A; convex_on A q\<rbrakk> \<Longrightarrow> (\<lambda>x. q (X x)) \<in> borel_measurable M
[PROOF STEP]
by (rule measurable_compose[where f=X and N="restrict_space borel A"])
     (auto intro!: borel_measurable_continuous_on_restrict convex_on_continuous measurable_restrict_space2)


[STATEMENT]
lemma map_eq_append_conv:
  "map f xs = ys @ zs \<longleftrightarrow> (\<exists>ys' zs'. map f ys' = ys \<and> map f zs' = zs \<and> xs = ys' @ zs')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map f xs = ys @ zs) = (\<exists>ys' zs'. map f ys' = ys \<and> map f zs' = zs \<and> xs = ys' @ zs')
[PROOF STEP]
apply(rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. map f xs = ys @ zs \<Longrightarrow> \<exists>ys' zs'. map f ys' = ys \<and> map f zs' = zs \<and> xs = ys' @ zs'
 2. \<exists>ys' zs'. map f ys' = ys \<and> map f zs' = zs \<and> xs = ys' @ zs' \<Longrightarrow> map f xs = ys @ zs
[PROOF STEP]
apply(metis append_eq_conv_conj append_take_drop_id drop_map take_map)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ys' zs'. map f ys' = ys \<and> map f zs' = zs \<and> xs = ys' @ zs' \<Longrightarrow> map f xs = ys @ zs
[PROOF STEP]
by(clarsimp)


[STATEMENT]
lemma sdiv_int_range:
  \<open>a sdiv b \<in> {- \<bar>a\<bar>..\<bar>a\<bar>}\<close> for a b :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a sdiv b \<in> {- \<bar>a\<bar>..\<bar>a\<bar>}
[PROOF STEP]
using zdiv_mono2 [of \<open>\<bar>a\<bar>\<close> 1 \<open>\<bar>b\<bar>\<close>]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> \<bar>a\<bar>; 0 < 1; 1 \<le> \<bar>b\<bar>\<rbrakk> \<Longrightarrow> \<bar>a\<bar> div \<bar>b\<bar> \<le> \<bar>a\<bar> div 1

goal (1 subgoal):
 1. a sdiv b \<in> {- \<bar>a\<bar>..\<bar>a\<bar>}
[PROOF STEP]
by (cases \<open>b = 0\<close>; cases \<open>sgn b = sgn a\<close>)
     (auto simp add: signed_divide_int_def pos_imp_zdiv_nonneg_iff
     dest!: sgn_not_eq_imp intro: order_trans [of _ 0])


[STATEMENT]
lemma i_Exec_Stream_nth_gr0_calc: "
  0 < n \<Longrightarrow>
  (i_Exec_Comp_Stream trans_fun input c) n =
  trans_fun (input n) ((i_Exec_Comp_Stream trans_fun input c) (n - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> i_Exec_Comp_Stream trans_fun input c n = trans_fun (input n) (i_Exec_Comp_Stream trans_fun input c (n - 1))
[PROOF STEP]
by (simp add: i_Exec_Stream_nth i_take_Suc_conv_app_nth f_Exec_append)


[STATEMENT]
lemma atLeastAtMost_singleton_iff[simp]: "{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c} \<longleftrightarrow> a = b \<and> b = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}) = (a = b \<and> b = c)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c} \<Longrightarrow> a = b \<and> b = c
 2. a = b \<and> b = c \<Longrightarrow> {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
[PROOF STEP]
assume "{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}"
[PROOF STATE]
proof (state)
this:
{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}

goal (2 subgoals):
 1. {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c} \<Longrightarrow> a = b \<and> b = c
 2. a = b \<and> b = c \<Longrightarrow> {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
[PROOF STEP]
hence *: "\<not> (\<not> a \<le>\<^sub>a b)"
[PROOF STATE]
proof (prove)
using this:
{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}

goal (1 subgoal):
 1. \<not> \<not> a \<le>\<^sub>a b
[PROOF STEP]
unfolding atLeastatMost_empty_iff[symmetric]
[PROOF STATE]
proof (prove)
using this:
{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}

goal (1 subgoal):
 1. {a\<le>\<^sub>a..\<le>\<^sub>ab} \<noteq> {}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<not> \<not> a \<le>\<^sub>a b

goal (2 subgoals):
 1. {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c} \<Longrightarrow> a = b \<and> b = c
 2. a = b \<and> b = c \<Longrightarrow> {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
[PROOF STEP]
with \<open>{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}\<close>
[PROOF STATE]
proof (chain)
picking this:
{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
\<not> \<not> a \<le>\<^sub>a b
[PROOF STEP]
have "c \<le>\<^sub>a a \<and> b \<le>\<^sub>a c"
[PROOF STATE]
proof (prove)
using this:
{a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
\<not> \<not> a \<le>\<^sub>a b

goal (1 subgoal):
 1. c \<le>\<^sub>a a \<and> b \<le>\<^sub>a c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
c \<le>\<^sub>a a \<and> b \<le>\<^sub>a c

goal (2 subgoals):
 1. {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c} \<Longrightarrow> a = b \<and> b = c
 2. a = b \<and> b = c \<Longrightarrow> {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
\<not> \<not> a \<le>\<^sub>a b
c \<le>\<^sub>a a \<and> b \<le>\<^sub>a c
[PROOF STEP]
show "a = b \<and> b = c"
[PROOF STATE]
proof (prove)
using this:
\<not> \<not> a \<le>\<^sub>a b
c \<le>\<^sub>a a \<and> b \<le>\<^sub>a c

goal (1 subgoal):
 1. a = b \<and> b = c
[PROOF STEP]
by (auto intro: antisym order_trans)
[PROOF STATE]
proof (state)
this:
a = b \<and> b = c

goal (1 subgoal):
 1. a = b \<and> b = c \<Longrightarrow> {a\<le>\<^sub>a..\<le>\<^sub>ab} = {c}
[PROOF STEP]
qed simp


[STATEMENT]
lemma solves_odeI:
  assumes solves_ode_vderivD: "(y has_vderiv_on (\<lambda>t. f t (y t))) T"
    and solves_ode_domainD: "\<And>t. t \<in> T \<Longrightarrow> y t \<in> X"
  shows "(y solves_ode f) T X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y solves_ode f) T X
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(y has_vderiv_on (\<lambda>t. f t (y t))) T
?t \<in> T \<Longrightarrow> y ?t \<in> X

goal (1 subgoal):
 1. (y solves_ode f) T X
[PROOF STEP]
by (auto simp: solves_ode_def)


[STATEMENT]
lemma map_zip_replicate_False_xor:
  "n = length xs \<Longrightarrow> map (\<lambda>(x, y). x = (\<not> y)) (zip xs (replicate n False)) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n = length xs \<Longrightarrow> map2 (\<lambda>x y. x = (\<not> y)) xs (replicate n False) = xs
[PROOF STEP]
by (induct xs arbitrary: n, auto)


[STATEMENT]
lemma lens_plus_eq_right: "\<lbrakk> X \<bowtie> Y; Y \<approx>\<^sub>L Z \<rbrakk> \<Longrightarrow> X +\<^sub>L Y \<approx>\<^sub>L X +\<^sub>L Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<bowtie> Y; Y \<approx>\<^sub>L Z\<rbrakk> \<Longrightarrow> X +\<^sub>L Y \<approx>\<^sub>L X +\<^sub>L Z
[PROOF STEP]
by (meson lens_equiv_def lens_indep_sym lens_plus_mono_right sublens_pres_indep)


[STATEMENT]
lemma fMin_less_Length[simp]: "x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> fMin (m1\<^bsup>\<AA>\<^esup>k) < Length \<AA>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> fMin (m1\<^bsup>\<AA>\<^esup>k) < Length \<AA>
[PROOF STEP]
by transfer
    (force elim: order.strict_trans2[OF MSB_greater, rotated -1] intro: fMin_in split: order.splits)


[STATEMENT]
lemma eq_free_eq_subst_te: "(\<forall>n. n\<in>(free_tv t) \<longrightarrow> S1 n = S2 n) \<Longrightarrow> $ S1 (t::typ) = $ S2 t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. n \<in> free_tv t \<longrightarrow> S1 n = S2 n \<Longrightarrow> $ S1 t = $ S2 t
[PROOF STEP]
apply (rule typ_substitutions_only_on_free_variables)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. n \<in> free_tv t \<longrightarrow> S1 n = S2 n \<Longrightarrow> \<forall>x\<in>free_tv t. S1 x = S2 x
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma std_normal_moment_abs_odd:
  "has_bochner_integral lborel (\<lambda>x. std_normal_density x * \<bar>x\<bar>^(2 * k + 1)) (sqrt (2/pi) * 2^k * fact k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_bochner_integral lborel (\<lambda>x. std_normal_density x * \<bar>x\<bar> ^ (2 * k + 1)) (sqrt (2 / pi) * 2 ^ k * fact k)
[PROOF STEP]
using normal_moment_abs_odd[of 1 0 k]
[PROOF STATE]
proof (prove)
using this:
0 < 1 \<Longrightarrow> has_bochner_integral lborel (\<lambda>x. std_normal_density x * \<bar>x - 0\<bar> ^ (2 * k + 1)) (2 ^ k * 1 ^ (2 * k + 1) * fact k * sqrt (2 / pi))

goal (1 subgoal):
 1. has_bochner_integral lborel (\<lambda>x. std_normal_density x * \<bar>x\<bar> ^ (2 * k + 1)) (sqrt (2 / pi) * 2 ^ k * fact k)
[PROOF STEP]
by (simp add: ac_simps)


[STATEMENT]
lemma aprimedivisor_nat:
  assumes "n \<noteq> (Suc 0::nat)"
  shows   "prime (aprimedivisor n)" "aprimedivisor n dvd n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime (aprimedivisor n) &&& aprimedivisor n dvd n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. prime (aprimedivisor n)
 2. aprimedivisor n dvd n
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> Suc 0
[PROOF STEP]
have "\<exists>p. prime p \<and> p dvd n"
[PROOF STATE]
proof (prove)
using this:
n \<noteq> Suc 0

goal (1 subgoal):
 1. \<exists>p. prime p \<and> p dvd n
[PROOF STEP]
by (intro prime_factor_nat) auto
[PROOF STATE]
proof (state)
this:
\<exists>p. prime p \<and> p dvd n

goal (2 subgoals):
 1. prime (aprimedivisor n)
 2. aprimedivisor n dvd n
[PROOF STEP]
from someI_ex[OF this, folded aprimedivisor_def]
[PROOF STATE]
proof (chain)
picking this:
prime (aprimedivisor n) \<and> aprimedivisor n dvd n
[PROOF STEP]
show "prime (aprimedivisor n)" "aprimedivisor n dvd n"
[PROOF STATE]
proof (prove)
using this:
prime (aprimedivisor n) \<and> aprimedivisor n dvd n

goal (1 subgoal):
 1. prime (aprimedivisor n) &&& aprimedivisor n dvd n
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
prime (aprimedivisor n)
aprimedivisor n dvd n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integral_inner_right[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. c \<bullet> f x \<partial>M) = c \<bullet> integral\<^sup>L M f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<noteq> (0::'a) \<Longrightarrow> integrable M f) \<Longrightarrow> LINT x|M. c \<bullet> f x = c \<bullet> integral\<^sup>L M f
[PROOF STEP]
by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_inner_right)


[STATEMENT]
lemma uniformly_convergent_eq_Cauchy:
  "uniformly_convergent_on X f = uniformly_Cauchy_on X f" for f::"nat \<Rightarrow> 'b \<Rightarrow> 'a::complete_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uniformly_convergent_on X f = uniformly_Cauchy_on X f
[PROOF STEP]
using Cauchy_uniformly_convergent uniformly_convergent_Cauchy
[PROOF STATE]
proof (prove)
using this:
uniformly_Cauchy_on ?X ?f \<Longrightarrow> uniformly_convergent_on ?X ?f
uniformly_convergent_on ?X ?f \<Longrightarrow> uniformly_Cauchy_on ?X ?f

goal (1 subgoal):
 1. uniformly_convergent_on X f = uniformly_Cauchy_on X f
[PROOF STEP]
by blast


[STATEMENT]
lemma TID_nonneg:
  "turn_into_distance f x y \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> turn_into_distance f x y
[PROOF STEP]
unfolding turn_into_distance_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> Inf {\<Sum>i = 0..<n. f (u i) (u (Suc i)) |u n. u 0 = x \<and> u n = y}
[PROOF STEP]
apply (rule cInf_greatest[OF nonempty])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa. xa \<in> {\<Sum>i = 0..<n. f (u i) (u (Suc i)) |u n. u 0 = x \<and> u n = y} \<Longrightarrow> 0 \<le> xa
[PROOF STEP]
using nonneg
[PROOF STATE]
proof (prove)
using this:
0 \<le> f ?x ?y

goal (1 subgoal):
 1. \<And>xa. xa \<in> {\<Sum>i = 0..<n. f (u i) (u (Suc i)) |u n. u 0 = x \<and> u n = y} \<Longrightarrow> 0 \<le> xa
[PROOF STEP]
by (auto simp add: sum_nonneg)


[STATEMENT]
lemma reaches_Times_iff [simp]:
     "reaches (Times fsm1 fsm2) \<langle>st1,st2\<rangle> xs \<langle>st1',st2'\<rangle> \<longleftrightarrow>
      reaches fsm1 st1 xs st1' \<and> reaches fsm2 st2 xs st2'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. reaches (Times fsm1 fsm2) \<langle>st1, st2\<rangle> xs \<langle>st1', st2'\<rangle> = (reaches fsm1 st1 xs st1' \<and> reaches fsm2 st2 xs st2')
[PROOF STEP]
apply (induct xs arbitrary: st1 st2 st1' st2', force)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs st1 st2 st1' st2'. (\<And>st1 st2 st1' st2'. reaches (Times fsm1 fsm2) \<langle>st1, st2\<rangle> xs \<langle>st1', st2'\<rangle> = (reaches fsm1 st1 xs st1' \<and> reaches fsm2 st2 xs st2')) \<Longrightarrow> reaches (Times fsm1 fsm2) \<langle>st1, st2\<rangle> (a # xs) \<langle>st1', st2'\<rangle> = (reaches fsm1 st1 (a # xs) st1' \<and> reaches fsm2 st2 (a # xs) st2')
[PROOF STEP]
apply (force simp add: next_Times Times_def reaches.Cons)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma minus_complex_interval_tendsto:
  "A \<longlonglongrightarrow>\<^sub>c a \<Longrightarrow> B \<longlonglongrightarrow>\<^sub>c b \<Longrightarrow> (\<lambda>i. A i - B i) \<longlonglongrightarrow>\<^sub>c a - b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<longlonglongrightarrow>\<^sub>c a; B \<longlonglongrightarrow>\<^sub>c b\<rbrakk> \<Longrightarrow> (\<lambda>i. A i - B i) \<longlonglongrightarrow>\<^sub>c a - b
[PROOF STEP]
unfolding complex_interval_tendsto_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(Re_interval \<circ> A) \<longlonglongrightarrow>\<^sub>i Re a \<and> (Im_interval \<circ> A) \<longlonglongrightarrow>\<^sub>i Im a; (Re_interval \<circ> B) \<longlonglongrightarrow>\<^sub>i Re b \<and> (Im_interval \<circ> B) \<longlonglongrightarrow>\<^sub>i Im b\<rbrakk> \<Longrightarrow> (Re_interval \<circ> (\<lambda>i. A i - B i)) \<longlonglongrightarrow>\<^sub>i Re (a - b) \<and> (Im_interval \<circ> (\<lambda>i. A i - B i)) \<longlonglongrightarrow>\<^sub>i Im (a - b)
[PROOF STEP]
by (auto intro!: minus_interval_tendsto simp: o_def Re_interval_minus Im_interval_minus)


[STATEMENT]
lemma ipoly_reflect_poly: assumes x: "(x :: 'a :: field_char_0) \<noteq> 0"
  shows "ipoly (reflect_poly p) x = x ^ (degree p) * ipoly p (inverse x)" (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)
[PROOF STEP]
let ?or = "of_int :: int \<Rightarrow> 'a"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)
[PROOF STEP]
have hom: "inj_idom_hom ?or"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_idom_hom of_int
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
inj_idom_hom of_int

goal (1 subgoal):
 1. ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)
[PROOF STEP]
using poly_reflect_poly_nz[OF x, of "map_poly ?or p"]
[PROOF STATE]
proof (prove)
using this:
poly (reflect_poly (of_int_poly p)) x = x ^ degree (of_int_poly p) * ipoly p (inverse x)

goal (1 subgoal):
 1. ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)
[PROOF STEP]
by (simp add: inj_idom_hom.reflect_poly_hom[OF hom])
[PROOF STATE]
proof (state)
this:
ipoly (reflect_poly p) x = x ^ degree p * ipoly p (inverse x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma restrict_simps[simp]:
      "alphabet (restrict A) = alphabet A"
      "initial (restrict A) = initial A"
      "transition (restrict A) a p = (if a \<in> alphabet A then transition A a p else {})"
      "condition (restrict A) = condition A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (alphabet (restrict A) = alphabet A &&& initial (restrict A) = initial A) &&& transition (restrict A) a p = (if a \<in> alphabet A then transition A a p else {}) &&& condition (restrict A) = condition A
[PROOF STEP]
unfolding restrict_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (alphabet (automaton (alphabet A) (initial A) (\<lambda>a p. if a \<in> alphabet A then transition A a p else {}) (condition A)) = alphabet A &&& initial (automaton (alphabet A) (initial A) (\<lambda>a p. if a \<in> alphabet A then transition A a p else {}) (condition A)) = initial A) &&& transition (automaton (alphabet A) (initial A) (\<lambda>a p. if a \<in> alphabet A then transition A a p else {}) (condition A)) a p = (if a \<in> alphabet A then transition A a p else {}) &&& condition (automaton (alphabet A) (initial A) (\<lambda>a p. if a \<in> alphabet A then transition A a p else {}) (condition A)) = condition A
[PROOF STEP]
by auto


[STATEMENT]
lemma is_expansion_lift:
  assumes "basis_wf (b # basis)" "is_expansion C basis"
  shows   "is_expansion (lift_ms C) (b # basis)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
basis_wf (b # basis)
is_expansion C basis
[PROOF STEP]
have "filterlim b at_top at_top"
[PROOF STATE]
proof (prove)
using this:
basis_wf (b # basis)
is_expansion C basis

goal (1 subgoal):
 1. filterlim b at_top at_top
[PROOF STEP]
by (simp add: basis_wf_Cons)
[PROOF STATE]
proof (state)
this:
filterlim b at_top at_top

goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
hence b_pos: "eventually (\<lambda>x. b x > 0) at_top"
[PROOF STATE]
proof (prove)
using this:
filterlim b at_top at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 0 < b x
[PROOF STEP]
by (simp add: filterlim_at_top_dense)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. 0 < b x

goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. 0 < b x

goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
basis_wf (b # basis)
is_expansion C basis
[PROOF STEP]
have "eval C \<in> o(\<lambda>x. b x powr e)" if "e > 0" for e
[PROOF STATE]
proof (prove)
using this:
basis_wf (b # basis)
is_expansion C basis

goal (1 subgoal):
 1. eval C \<in> o(\<lambda>x. b x powr e)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
basis_wf (b # basis)
is_expansion C basis
0 < e

goal (1 subgoal):
 1. eval C \<in> o(\<lambda>x. b x powr e)
[PROOF STEP]
by (intro is_expansion_imp_smallo[OF _ assms(2)]) (simp_all add: basis_wf_Cons)
[PROOF STATE]
proof (state)
this:
0 < ?e \<Longrightarrow> eval C \<in> o(\<lambda>x. b x powr ?e)

goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in at_top. 0 < b x
0 < ?e \<Longrightarrow> eval C \<in> o(\<lambda>x. b x powr ?e)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. 0 < b x
0 < ?e \<Longrightarrow> eval C \<in> o(\<lambda>x. b x powr ?e)

goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. 0 < b x
0 < ?e \<Longrightarrow> eval C \<in> o(\<lambda>x. b x powr ?e)
basis_wf (b # basis)
is_expansion C basis

goal (1 subgoal):
 1. is_expansion (lift_ms C) (b # basis)
[PROOF STEP]
by (auto intro!: is_expansion_aux.intros simp: lift_ms_def is_expansion_length
             elim: eventually_mono)
[PROOF STATE]
proof (state)
this:
is_expansion (lift_ms C) (b # basis)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma kernel_memberD:
  assumes "x \<in> space_as_set (kernel A)"
  shows "A *\<^sub>V x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A *\<^sub>V x = (0::'b)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> space_as_set (kernel A)

goal (1 subgoal):
 1. A *\<^sub>V x = (0::'b)
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x A. \<lbrakk>bounded_clinear A; x \<in> A -` {0::'b}\<rbrakk> \<Longrightarrow> A x = (0::'b)
[PROOF STEP]
by auto


[STATEMENT]
lemma fps_mult_equiv:
  fixes f g :: "('a :: {euclidean_ring_cancel}) fps"
  assumes "(f, g) \<in> fpsmodrel p"
  shows "(f*h, g*h) \<in> fpsmodrel p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f * h, g * h) \<in> fpsmodrel p
[PROOF STEP]
using fpsmodrel_def fps_mult_equiv_coeff assms
[PROOF STATE]
proof (prove)
using this:
fpsmodrel ?p \<equiv> {(f, g). \<forall>n. f $ n mod ?p = g $ n mod ?p}
(?f, ?g) \<in> fpsmodrel ?p \<Longrightarrow> (?f * ?h) $ ?n mod ?p = (?g * ?h) $ ?n mod ?p
(f, g) \<in> fpsmodrel p

goal (1 subgoal):
 1. (f * h, g * h) \<in> fpsmodrel p
[PROOF STEP]
by blast


[STATEMENT]
lemma poly_divide_tendsto_aux:
  fixes p::"'a::real_normed_field poly"
  shows "((\<lambda>x. poly p x/x^(degree p)) \<longlongrightarrow> lead_coeff p) at_infinity"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity
[PROOF STEP]
proof (induct p)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ((\<lambda>x. poly 0 x / x ^ degree 0) \<longlongrightarrow> lead_coeff 0) at_infinity
 2. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. ((\<lambda>x. poly 0 x / x ^ degree 0) \<longlongrightarrow> lead_coeff 0) at_infinity
 2. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. poly 0 x / x ^ degree 0) \<longlongrightarrow> lead_coeff 0) at_infinity
[PROOF STEP]
by (auto intro:tendsto_eq_intros)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. poly 0 x / x ^ degree 0) \<longlongrightarrow> lead_coeff 0) at_infinity

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
case (pCons a p)
[PROOF STATE]
proof (state)
this:
a \<noteq> (0::'a) \<or> p \<noteq> 0
((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
have ?case when "p=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
p = 0

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p = 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
p = 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
have ?case when "p\<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
define g where "g=(\<lambda>x. a/(x*x^degree p))"
[PROOF STATE]
proof (state)
this:
g = (\<lambda>x. a / (x * x ^ degree p))

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
define f where "f=(\<lambda>x. poly p x/x^degree p)"
[PROOF STATE]
proof (state)
this:
f = (\<lambda>x. poly p x / x ^ degree p)

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
have "\<forall>\<^sub>Fx in at_infinity. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_infinity. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
proof (rule eventually_at_infinityI[of 1])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. 1 \<le> norm x \<Longrightarrow> poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
fix x::'a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. 1 \<le> norm x \<Longrightarrow> poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
assume "norm x\<ge>1"
[PROOF STATE]
proof (state)
this:
1 \<le> norm x

goal (1 subgoal):
 1. \<And>x. 1 \<le> norm x \<Longrightarrow> poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 \<le> norm x
[PROOF STEP]
have "x\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
1 \<le> norm x

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

goal (1 subgoal):
 1. \<And>x. 1 \<le> norm x \<Longrightarrow> poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> (0::'a)
[PROOF STEP]
show "poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)

goal (1 subgoal):
 1. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)
p \<noteq> 0

goal (1 subgoal):
 1. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
[PROOF STEP]
unfolding g_def f_def
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)
p \<noteq> 0

goal (1 subgoal):
 1. poly (pCons a p) x / x ^ degree (pCons a p) = a / (x * x ^ degree p) + poly p x / x ^ degree p
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_infinity. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_infinity. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
have "((\<lambda>x. g x+f x) \<longlongrightarrow>  lead_coeff (pCons a p)) at_infinity"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
have "(g \<longlongrightarrow>  0) at_infinity"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g \<longlongrightarrow> (0::'a)) at_infinity
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. a / (x * x ^ degree p)) \<longlongrightarrow> (0::'a)) at_infinity
[PROOF STEP]
using filterlim_poly_at_infinity[of "monom 1 (Suc (degree p))"]
[PROOF STATE]
proof (prove)
using this:
0 < degree (monom (1::?'b1) (Suc (degree p))) \<Longrightarrow> filterlim (poly (monom (1::?'b1) (Suc (degree p)))) at_infinity at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. a / (x * x ^ degree p)) \<longlongrightarrow> (0::'a)) at_infinity
[PROOF STEP]
apply (auto intro!:tendsto_intros tendsto_divide_0 simp add: degree_monom_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim (poly (monom (1::?'b1) (Suc (degree p)))) at_infinity at_infinity \<Longrightarrow> LIM x at_infinity. x * x ^ degree p :> at_infinity
[PROOF STEP]
apply (subst filterlim_cong[where g="poly (monom 1 (Suc (degree p)))"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. filterlim (poly (monom (1::?'b1) (Suc (degree p)))) at_infinity at_infinity \<Longrightarrow> at_infinity = ?F1'7
 2. filterlim (poly (monom (1::?'b1) (Suc (degree p)))) at_infinity at_infinity \<Longrightarrow> at_infinity = ?F2'7
 3. filterlim (poly (monom (1::?'b1) (Suc (degree p)))) at_infinity at_infinity \<Longrightarrow> \<forall>\<^sub>F x in at_infinity. x * x ^ degree p = poly (monom (1::'a) (Suc (degree p))) x
 4. filterlim (poly (monom (1::?'b1) (Suc (degree p)))) at_infinity at_infinity \<Longrightarrow> filterlim (poly (monom (1::'a) (Suc (degree p)))) ?F1'7 ?F2'7
[PROOF STEP]
by (auto simp add:poly_monom)
[PROOF STATE]
proof (state)
this:
(g \<longlongrightarrow> (0::'a)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g \<longlongrightarrow> (0::'a)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
have "(f \<longlongrightarrow>  lead_coeff (pCons a p)) at_infinity"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
using pCons \<open>p\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a) \<or> p \<noteq> 0
((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity
p \<noteq> 0

goal (1 subgoal):
 1. (f \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a) \<or> p \<noteq> 0
((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity
p \<noteq> 0

goal (1 subgoal):
 1. ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g \<longlongrightarrow> (0::'a)) at_infinity
(f \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(g \<longlongrightarrow> (0::'a)) at_infinity
(f \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
by (auto intro:tendsto_eq_intros)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in at_infinity. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_infinity. poly (pCons a p) x / x ^ degree (pCons a p) = g x + f x
((\<lambda>x. g x + f x) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
by (auto dest:tendsto_cong)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
p \<noteq> 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; ((\<lambda>x. poly p x / x ^ degree p) \<longlongrightarrow> lead_coeff p) at_infinity\<rbrakk> \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
p = 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
p \<noteq> 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
p = 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
p \<noteq> 0 \<Longrightarrow> ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal (1 subgoal):
 1. ((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. poly (pCons a p) x / x ^ degree (pCons a p)) \<longlongrightarrow> lead_coeff (pCons a p)) at_infinity

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Fract_less_one_iff: "0 < b \<Longrightarrow> Fract a b < 1 \<longleftrightarrow> a < b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < b \<Longrightarrow> (Fract a b < 1) = (a < b)
[PROOF STEP]
by (auto simp add: One_fract_def mult_less_cancel_right_disj)


[STATEMENT]
lemma conv_radius_zeroI:
  fixes f :: "nat \<Rightarrow> 'a :: {banach,real_normed_div_algebra}"
  assumes "\<And>z. z \<noteq> 0 \<Longrightarrow> \<not>summable (\<lambda>n. f n * z^n)"
  shows   "conv_radius f = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius f = 0
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
assume "conv_radius f \<noteq> 0"
[PROOF STATE]
proof (state)
this:
conv_radius f \<noteq> 0

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
with conv_radius_nonneg[of f]
[PROOF STATE]
proof (chain)
picking this:
0 \<le> conv_radius f
conv_radius f \<noteq> 0
[PROOF STEP]
have pos: "conv_radius f > 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> conv_radius f
conv_radius f \<noteq> 0

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

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
define r where "r = (if conv_radius f = \<infinity> then 1 else real_of_ereal (conv_radius f) / 2)"
[PROOF STATE]
proof (state)
this:
r = (if conv_radius f = \<infinity> then 1 else real_of_ereal (conv_radius f) / 2)

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
from pos
[PROOF STATE]
proof (chain)
picking this:
0 < conv_radius f
[PROOF STEP]
have r: "ereal r > 0 \<and> ereal r < conv_radius f"
[PROOF STATE]
proof (prove)
using this:
0 < conv_radius f

goal (1 subgoal):
 1. 0 < ereal r \<and> ereal r < conv_radius f
[PROOF STEP]
by (cases "conv_radius f") (simp_all add: r_def)
[PROOF STATE]
proof (state)
this:
0 < ereal r \<and> ereal r < conv_radius f

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
hence "summable (\<lambda>n. f n * of_real r ^ n)"
[PROOF STATE]
proof (prove)
using this:
0 < ereal r \<and> ereal r < conv_radius f

goal (1 subgoal):
 1. summable (\<lambda>n. f n * of_real r ^ n)
[PROOF STEP]
by (intro summable_in_conv_radius) simp
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. f n * of_real r ^ n)

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. f n * of_real r ^ n)

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
from r and assms[of "of_real r"]
[PROOF STATE]
proof (chain)
picking this:
0 < ereal r \<and> ereal r < conv_radius f
of_real r \<noteq> (0::'a) \<Longrightarrow> \<not> summable (\<lambda>n. f n * of_real r ^ n)
[PROOF STEP]
have "\<not>summable (\<lambda>n. f n * of_real r ^ n)"
[PROOF STATE]
proof (prove)
using this:
0 < ereal r \<and> ereal r < conv_radius f
of_real r \<noteq> (0::'a) \<Longrightarrow> \<not> summable (\<lambda>n. f n * of_real r ^ n)

goal (1 subgoal):
 1. \<not> summable (\<lambda>n. f n * of_real r ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<not> summable (\<lambda>n. f n * of_real r ^ n)

goal (1 subgoal):
 1. conv_radius f \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
summable (\<lambda>n. f n * of_real r ^ n)
\<not> summable (\<lambda>n. f n * of_real r ^ n)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. f n * of_real r ^ n)
\<not> summable (\<lambda>n. f n * of_real r ^ n)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma E_of_succ_is_rel_of_succ: "E_of_succ = rel_of_succ"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. E_of_succ = rel_of_succ
[PROOF STEP]
by (auto intro!: ext simp: E_of_succ_def rel_of_succ_def)


[STATEMENT]
lemma approx_HFinite_mult_cancel_iff1: "a \<in> HFinite - Infinitesimal \<Longrightarrow> a * w \<approx> a * z \<longleftrightarrow> w \<approx> z"
  for a w z :: "'a::real_normed_div_algebra star"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> HFinite - Infinitesimal \<Longrightarrow> (a * w \<approx> a * z) = (w \<approx> z)
[PROOF STEP]
by (auto intro: approx_mult2 approx_HFinite_mult_cancel)


[STATEMENT]
lemma (in group) hom_integer_group_pow:
   "x \<in> carrier G \<Longrightarrow> pow G x \<in> hom integer_group G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> ([^]) x \<in> hom integer_group G
[PROOF STEP]
by (rule homI) (auto simp: int_pow_mult)


[STATEMENT]
lemma [simp]:
  shows sumlist_Cons: "sumlist (x#xs) = x \<oplus> sumlist xs"
    and sumlist_Nil: "sumlist [] = \<zero>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sumlist (x # xs) = x \<oplus> sumlist xs &&& sumlist [] = \<zero>
[PROOF STEP]
by (simp_all add: sumlist_def)


[STATEMENT]
lemma o_substA:
"substA \<pi>1 o substA \<pi>2 = substA (subst \<pi>1 o \<pi>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. substA \<pi>1 \<circ> substA \<pi>2 = substA (subst \<pi>1 \<circ> \<pi>2)
[PROOF STEP]
apply(rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (substA \<pi>1 \<circ> substA \<pi>2) x = substA (subst \<pi>1 \<circ> \<pi>2) x
[PROOF STEP]
apply(subst comp_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. substA \<pi>1 (substA \<pi>2 x) = substA (subst \<pi>1 \<circ> \<pi>2) x
[PROOF STEP]
unfolding substA_o[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. substA (subst \<pi>1 \<circ> \<pi>2) x = substA (subst \<pi>1 \<circ> \<pi>2) x
[PROOF STEP]
..


[STATEMENT]
lemma qbs_Mx_to_X[dest]:
  assumes "\<alpha> \<in> qbs_Mx X"
  shows "\<alpha> \<in> UNIV \<rightarrow> qbs_space X"
        "\<alpha> r \<in> qbs_space X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> \<in> UNIV \<rightarrow> qbs_space X &&& \<alpha> r \<in> qbs_space X
[PROOF STEP]
using qbs_decomp assms
[PROOF STATE]
proof (prove)
using this:
(qbs_space ?X, qbs_Mx ?X) \<in> {(X, Mx). is_quasi_borel X Mx}
\<alpha> \<in> qbs_Mx X

goal (1 subgoal):
 1. \<alpha> \<in> UNIV \<rightarrow> qbs_space X &&& \<alpha> r \<in> qbs_space X
[PROOF STEP]
by(auto simp: is_quasi_borel_def)


[STATEMENT]
lemma clique_edges_inside :
  assumes G1: "uwellformed G" and G2: "finite (uverts G)"
    and p: "p \<le> card (uverts G)" and n: "n = card(uverts G)"
    and C: "uclique C G p"
  shows "card {e \<in> uedges G. e \<subseteq> uverts C} = p * (p-1) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
have "2 dvd (card (uverts C) * (p - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (card (uverts C) * (p - 1))
[PROOF STEP]
using C uclique_def
[PROOF STATE]
proof (prove)
using this:
uclique C G p
uclique ?C ?G ?p \<equiv> ?p = card (uverts ?C) \<and> subgraph ?C ?G \<and> ?C = Ugraph_Lemmas.complete (uverts ?C)

goal (1 subgoal):
 1. even (card (uverts C) * (p - 1))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
even (card (uverts C) * (p - 1))

goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
have "2 = real 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 = real 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
2 = real 2

goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
2 = real 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
2 = real 2

goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
using C uclique_def [of C G p] complete_def [of "uverts C"]
[PROOF STATE]
proof (prove)
using this:
2 = real 2
uclique C G p
uclique C G p \<equiv> p = card (uverts C) \<and> subgraph C G \<and> C = Ugraph_Lemmas.complete (uverts C)
Ugraph_Lemmas.complete (uverts C) = (uverts C, all_edges (uverts C))

goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
using subgraph_clique [OF G1, of C] subgraph_verts_finite [OF assms(2), of C]
[PROOF STATE]
proof (prove)
using this:
2 = real 2
uclique C G p
uclique C G p \<equiv> p = card (uverts C) \<and> subgraph C G \<and> C = Ugraph_Lemmas.complete (uverts C)
Ugraph_Lemmas.complete (uverts C) = (uverts C, all_edges (uverts C))
\<lbrakk>subgraph C G; C = Ugraph_Lemmas.complete (uverts C)\<rbrakk> \<Longrightarrow> {e \<in> uedges G. e \<subseteq> uverts C} = uedges C
subgraph C G \<Longrightarrow> finite (uverts C)

goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
using Real.real_of_nat_div [OF \<open>2 dvd (card (uverts C) * (p - 1))\<close>] Binomial.choose_two [of " card (uverts G)"]
[PROOF STATE]
proof (prove)
using this:
2 = real 2
uclique C G p
uclique C G p \<equiv> p = card (uverts C) \<and> subgraph C G \<and> C = Ugraph_Lemmas.complete (uverts C)
Ugraph_Lemmas.complete (uverts C) = (uverts C, all_edges (uverts C))
\<lbrakk>subgraph C G; C = Ugraph_Lemmas.complete (uverts C)\<rbrakk> \<Longrightarrow> {e \<in> uedges G. e \<subseteq> uverts C} = uedges C
subgraph C G \<Longrightarrow> finite (uverts C)
real (card (uverts C) * (p - 1) div 2) = real (card (uverts C) * (p - 1)) / real 2
card (uverts G) choose 2 = card (uverts G) * (card (uverts G) - 1) div 2

goal (1 subgoal):
 1. real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2
[PROOF STEP]
by (smt (verit, del_insts) One_nat_def approximation_preproc_nat(5) card_all_edges diff_self_eq_0 eq_imp_le left_diff_distrib' left_diff_distrib' linorder_not_less mult_le_mono2 n_choose_2_nat not_gr0 not_less_eq_eq of_nat_1 of_nat_diff snd_eqD)
[PROOF STATE]
proof (state)
this:
real (card {e \<in> uedges G. e \<subseteq> uverts C}) = real p * (real p - 1) / 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_nodup: "finite I \<Longrightarrow> \<exists> l. set l = I \<and> nodup_all l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite I \<Longrightarrow> \<exists>l. set l = I \<and> nodup_all l
[PROOF STEP]
proof (induction rule: finite.induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>l. set l = {} \<and> nodup_all l
 2. \<And>A a. \<lbrakk>finite A; \<exists>l. set l = A \<and> nodup_all l\<rbrakk> \<Longrightarrow> \<exists>l. set l = insert a A \<and> nodup_all l
[PROOF STEP]
case emptyI
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<exists>l. set l = {} \<and> nodup_all l
 2. \<And>A a. \<lbrakk>finite A; \<exists>l. set l = A \<and> nodup_all l\<rbrakk> \<Longrightarrow> \<exists>l. set l = insert a A \<and> nodup_all l
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>l. set l = {} \<and> nodup_all l
[PROOF STEP]
by (simp add: nodup_all_def)
[PROOF STATE]
proof (state)
this:
\<exists>l. set l = {} \<and> nodup_all l

goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; \<exists>l. set l = A \<and> nodup_all l\<rbrakk> \<Longrightarrow> \<exists>l. set l = insert a A \<and> nodup_all l
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; \<exists>l. set l = A \<and> nodup_all l\<rbrakk> \<Longrightarrow> \<exists>l. set l = insert a A \<and> nodup_all l
[PROOF STEP]
case (insertI A a)
[PROOF STATE]
proof (state)
this:
finite A
\<exists>l. set l = A \<and> nodup_all l

goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; \<exists>l. set l = A \<and> nodup_all l\<rbrakk> \<Longrightarrow> \<exists>l. set l = insert a A \<and> nodup_all l
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite A
\<exists>l. set l = A \<and> nodup_all l
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite A
\<exists>l. set l = A \<and> nodup_all l

goal (1 subgoal):
 1. \<exists>l. set l = insert a A \<and> nodup_all l
[PROOF STEP]
by (metis insertE insert_absorb list.simps(15) nodup_all_def nodup_step)
[PROOF STATE]
proof (state)
this:
\<exists>l. set l = insert a A \<and> nodup_all l

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cadd_0_right [simp]: "Card \<kappa> \<Longrightarrow> \<kappa> \<oplus> 0 = \<kappa>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Card \<kappa> \<Longrightarrow> \<kappa> \<oplus> 0 = \<kappa>
[PROOF STEP]
by (simp add: cadd_commute)


[STATEMENT]
lemma (in topological_space) eventually_at_topological:
  "eventually P (at a within s) \<longleftrightarrow> (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. x \<noteq> a \<longrightarrow> x \<in> s \<longrightarrow> P x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (at a within s) = (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. x \<noteq> a \<longrightarrow> x \<in> s \<longrightarrow> P x))
[PROOF STEP]
by (simp add: eventually_nhds eventually_at_filter)


[STATEMENT]
lemma mat_tensor_prod_2_prelim [simp]:
  assumes "state 1 v" and "state 1 w"
  shows "v \<Otimes> w = mat_of_cols_list 4
[[v $$ (0,0) * w $$ (0,0), v $$ (0,0) * w $$ (1,0), v $$ (1,0) * w $$ (0,0), v $$ (1,0) * w $$ (1,0)]]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<Otimes> w = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]); j < dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (i, j) = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]] $$ (i, j)
 2. dim_row (v \<Otimes> w) = dim_row (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])
 3. dim_col (v \<Otimes> w) = dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])
[PROOF STEP]
define u where "u = mat_of_cols_list 4
[[v $$ (0,0) * w $$ (0,0), v $$ (0,0) * w $$ (1,0), v $$ (1,0) * w $$ (0,0), v $$ (1,0) * w $$ (1,0)]]"
[PROOF STATE]
proof (state)
this:
u = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]

goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]); j < dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (i, j) = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]] $$ (i, j)
 2. dim_row (v \<Otimes> w) = dim_row (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])
 3. dim_col (v \<Otimes> w) = dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]
[PROOF STEP]
show f1:"dim_row (v \<Otimes> w) = dim_row u"
[PROOF STATE]
proof (prove)
using this:
u = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]

goal (1 subgoal):
 1. dim_row (v \<Otimes> w) = dim_row u
[PROOF STEP]
using assms state_def mat_of_cols_list_def tensor_mat_def
[PROOF STATE]
proof (prove)
using this:
u = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]
state 1 v
state 1 w
state ?n ?v \<equiv> dim_col ?v = 1 \<and> dim_row ?v = 2 ^ ?n \<and> \<parallel>Matrix.col ?v 0\<parallel> = 1
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)
?A \<Otimes> ?B \<equiv> Tensor.mat_of_cols_list (dim_row ?A * dim_row ?B) (mult.Tensor (*) (mat_to_cols_list ?A) (mat_to_cols_list ?B))

goal (1 subgoal):
 1. dim_row (v \<Otimes> w) = dim_row u
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_row (v \<Otimes> w) = dim_row u

goal (2 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]); j < dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (i, j) = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]] $$ (i, j)
 2. dim_col (v \<Otimes> w) = dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])
[PROOF STEP]
show f2:"dim_col (v \<Otimes> w) = dim_col u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col (v \<Otimes> w) = dim_col u
[PROOF STEP]
using assms state_def mat_of_cols_list_def tensor_mat_def u_def
[PROOF STATE]
proof (prove)
using this:
state 1 v
state 1 w
state ?n ?v \<equiv> dim_col ?v = 1 \<and> dim_row ?v = 2 ^ ?n \<and> \<parallel>Matrix.col ?v 0\<parallel> = 1
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)
?A \<Otimes> ?B \<equiv> Tensor.mat_of_cols_list (dim_row ?A * dim_row ?B) (mult.Tensor (*) (mat_to_cols_list ?A) (mat_to_cols_list ?B))
u = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]

goal (1 subgoal):
 1. dim_col (v \<Otimes> w) = dim_col u
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_col (v \<Otimes> w) = dim_col u

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < dim_row (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]); j < dim_col (Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]])\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (i, j) = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]] $$ (i, j)
[PROOF STEP]
show "\<And>i j. i < dim_row u \<Longrightarrow> j < dim_col u \<Longrightarrow>  (v \<Otimes> w) $$ (i, j) = u $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < dim_row u; j < dim_col u\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (i, j) = u $$ (i, j)
[PROOF STEP]
using u_def tensor_mat_def assms state_def
[PROOF STATE]
proof (prove)
using this:
u = Tensor.mat_of_cols_list 4 [[v $$ (0, 0) * w $$ (0, 0), v $$ (0, 0) * w $$ (1, 0), v $$ (1, 0) * w $$ (0, 0), v $$ (1, 0) * w $$ (1, 0)]]
?A \<Otimes> ?B \<equiv> Tensor.mat_of_cols_list (dim_row ?A * dim_row ?B) (mult.Tensor (*) (mat_to_cols_list ?A) (mat_to_cols_list ?B))
state 1 v
state 1 w
state ?n ?v \<equiv> dim_col ?v = 1 \<and> dim_row ?v = 2 ^ ?n \<and> \<parallel>Matrix.col ?v 0\<parallel> = 1

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < dim_row u; j < dim_col u\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (i, j) = u $$ (i, j)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i < dim_row u; ?j < dim_col u\<rbrakk> \<Longrightarrow> (v \<Otimes> w) $$ (?i, ?j) = u $$ (?i, ?j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_archimedian_rdiv_eq_0:
  assumes x0: "x \<ge> 0"
    and c: "c \<ge> 0"
    and xc: "\<And>m::nat. m > 0 \<Longrightarrow> real m * x \<le> c"
  shows "x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = 0
[PROOF STEP]
by (metis reals_Archimedean3 dual_order.order_iff_strict le0 le_less_trans not_le x0 xc)


[STATEMENT]
lemma L274:
  assumes "\<forall> n. ((E n \<and>\<^sub>p X) = (E n \<and> Y))"
  shows "(\<Sqinter> (range E) \<and> X) = (\<Sqinter> (range E) \<and> Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Or>range E \<and> X) = (\<Or>range E \<and> Y)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>n. (E n \<and> X) = (E n \<and> Y)

goal (1 subgoal):
 1. (\<Or>range E \<and> X) = (\<Or>range E \<and> Y)
[PROOF STEP]
by (pred_auto)


[STATEMENT]
lemma degree_C[simp]: "degree (C a) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree (C a) = 0
[PROOF STEP]
by (simp add: C_def)


[STATEMENT]
lemma dropWhile_sing_pow: "dropWhile (\<lambda> x. x = a) w = \<epsilon> \<longleftrightarrow> w = [a]\<^sup>@\<^bold>|w\<^bold>|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dropWhile (\<lambda>x. x = a) w = \<epsilon>) = (w = [a] \<^sup>@ \<^bold>|w\<^bold>|)
[PROOF STEP]
by(induct w,  auto)


[STATEMENT]
lemma "\<forall>(x::int) \<ge> 8. \<exists>i j. 5*i + 3*j = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<ge>8. \<exists>i j. 5 * i + 3 * j = x
[PROOF STEP]
by cooper


[STATEMENT]
theorem "\<forall>(x::int). 2 dvd x \<longleftrightarrow> (\<forall>(y::int). x \<noteq> 2*y + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. even x = (\<forall>y. x \<noteq> 2 * y + 1)
[PROOF STEP]
by cooper


[STATEMENT]
lemma sums_add: "f sums a \<Longrightarrow> g sums b \<Longrightarrow> (\<lambda>n. f n + g n) sums (a + b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f sums a; g sums b\<rbrakk> \<Longrightarrow> (\<lambda>n. f n + g n) sums (a + b)
[PROOF STEP]
unfolding sums_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<lambda>n. sum f {..<n}) \<longlonglongrightarrow> a; (\<lambda>n. sum g {..<n}) \<longlonglongrightarrow> b\<rbrakk> \<Longrightarrow> (\<lambda>n. \<Sum>n<n. f n + g n) \<longlonglongrightarrow> a + b
[PROOF STEP]
by (simp add: sum.distrib tendsto_add)


[STATEMENT]
lemma ntrunc_o_equality:
    "[| !!k. (ntrunc(k) \<circ> h1) = (ntrunc(k) \<circ> h2) |] ==> h1=h2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k. ntrunc k \<circ> h1 = ntrunc k \<circ> h2) \<Longrightarrow> h1 = h2
[PROOF STEP]
apply (rule ntrunc_equality [THEN ext])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x k. (\<And>k. ntrunc k \<circ> h1 = ntrunc k \<circ> h2) \<Longrightarrow> ntrunc k (h1 x) = ntrunc k (h2 x)
[PROOF STEP]
apply (simp add: fun_eq_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma nsets_compose_image_funcset:
  assumes f: "f \<in> [T]\<^bsup>k\<^esup> \<rightarrow> D" and "g \<in> S \<rightarrow> T" and "inj_on g S"
  shows "f \<circ> (\<lambda>X. g ` X) \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<circ> (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<circ> (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D
[PROOF STEP]
have "(\<lambda>X. g ` X) \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f \<in> [T]\<^bsup>k\<^esup> \<rightarrow> D
g \<in> S \<rightarrow> T
inj_on g S

goal (1 subgoal):
 1. (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>
[PROOF STEP]
by (simp add: nsets_image_funcset)
[PROOF STATE]
proof (state)
this:
(`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>

goal (1 subgoal):
 1. f \<circ> (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>

goal (1 subgoal):
 1. f \<circ> (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
(`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> [T]\<^bsup>k\<^esup>
f \<in> [T]\<^bsup>k\<^esup> \<rightarrow> D

goal (1 subgoal):
 1. f \<circ> (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
f \<circ> (`) g \<in> [S]\<^bsup>k\<^esup> \<rightarrow> D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma iWeakUntil_singleton[simp]: "(P t0. t0 \<W> t1 {t}. Q t1) = (P t \<or> Q t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P t0. t0 \<W> t1 {t}. Q t1) = (P t \<or> Q t)
[PROOF STEP]
by (simp add: iWeakUntil_def cut_less_singleton)


[STATEMENT]
lemma infprod_in_sets[intro]:
  fixes E :: "nat \<Rightarrow> 'a set" assumes E: "\<And>i. E i \<in> sets (M i)"
  shows "Pi UNIV E \<in> sets (\<Pi>\<^sub>M i\<in>UNIV::nat set. M i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi UNIV E \<in> sets (Pi\<^sub>M UNIV M)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Pi UNIV E \<in> sets (Pi\<^sub>M UNIV M)
[PROOF STEP]
have "Pi UNIV E = (\<Inter>i. prod_emb UNIV M {..i} (\<Pi>\<^sub>E j\<in>{..i}. E j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi UNIV E = (\<Inter>i. prod_emb UNIV M {..i} (Pi\<^sub>E {..i} E))
[PROOF STEP]
using E E[THEN sets.sets_into_space]
[PROOF STATE]
proof (prove)
using this:
E ?i \<in> sets (M ?i)
E ?i1 \<subseteq> space (M ?i1)

goal (1 subgoal):
 1. Pi UNIV E = (\<Inter>i. prod_emb UNIV M {..i} (Pi\<^sub>E {..i} E))
[PROOF STEP]
by (auto simp: prod_emb_def Pi_iff extensional_def)
[PROOF STATE]
proof (state)
this:
Pi UNIV E = (\<Inter>i. prod_emb UNIV M {..i} (Pi\<^sub>E {..i} E))

goal (1 subgoal):
 1. Pi UNIV E \<in> sets (Pi\<^sub>M UNIV M)
[PROOF STEP]
with E
[PROOF STATE]
proof (chain)
picking this:
E ?i \<in> sets (M ?i)
Pi UNIV E = (\<Inter>i. prod_emb UNIV M {..i} (Pi\<^sub>E {..i} E))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
E ?i \<in> sets (M ?i)
Pi UNIV E = (\<Inter>i. prod_emb UNIV M {..i} (Pi\<^sub>E {..i} E))

goal (1 subgoal):
 1. Pi UNIV E \<in> sets (Pi\<^sub>M UNIV M)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Pi UNIV E \<in> sets (Pi\<^sub>M UNIV M)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cprank_max_0E: "cprank_max 0 A \<Longrightarrow> A = tensor0 (dims A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cprank_max 0 A \<Longrightarrow> A = tensor0 (dims A)
[PROOF STEP]
by (metis dims_tensor0 length_0_conv cprank_max0 cprank_maxE)


[STATEMENT]
lemma adj_cancel_eq1:
  fixes f :: "'a::preorder \<Rightarrow> 'b::order"
  shows "f \<stileturn> g \<Longrightarrow> f \<circ> g \<circ> f = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<stileturn> g \<Longrightarrow> f \<circ> g \<circ> f = f
[PROOF STEP]
unfolding adj_def comp_def fun_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. (f x \<le> y) = (x \<le> g y) \<Longrightarrow> \<forall>x. f (g (f x)) = f x
[PROOF STEP]
by (meson eq_iff order_refl order_trans)


[STATEMENT]
lemma Diagonal_to_Smith_row_i_PQ_eq:
  assumes P'B'Q': "(P',B',Q') = Diagonal_to_Smith_row_i_PQ i bezout (P,B,Q)"
    and diag: "isDiagonal B" and i: "i < min (nrows A) (ncols A)"
  shows "B' = Diagonal_to_Smith_row_i B i bezout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B' = Diagonal_to_Smith_row_i B i bezout
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(P', B', Q') = Diagonal_to_Smith_row_i_PQ i bezout (P, B, Q)
isDiagonal B
i < min (nrows A) (ncols A)

goal (1 subgoal):
 1. B' = Diagonal_to_Smith_row_i B i bezout
[PROOF STEP]
unfolding Diagonal_to_Smith_row_i_def Diagonal_to_Smith_row_i_PQ_def
[PROOF STATE]
proof (prove)
using this:
(P', B', Q') = diagonal_to_Smith_i_PQ [i + 1..<min (nrows B) (ncols B)] i bezout (P, B, Q)
isDiagonal B
i < min (nrows A) (ncols A)

goal (1 subgoal):
 1. B' = diagonal_to_Smith_i [i + 1..<min (nrows B) (ncols B)] B i bezout
[PROOF STEP]
using diagonal_to_Smith_i_PQ
[PROOF STATE]
proof (prove)
using this:
(P', B', Q') = diagonal_to_Smith_i_PQ [i + 1..<min (nrows B) (ncols B)] i bezout (P, B, Q)
isDiagonal B
i < min (nrows A) (ncols A)
\<lbrakk>(?P', ?B', ?Q') = diagonal_to_Smith_i_PQ ?xs ?i bezout (P, B, Q); \<forall>x. x \<in> set ?xs \<longrightarrow> x < min (nrows A) (ncols A); isDiagonal B; ?i \<notin> set ?xs; ?i < min (nrows A) (ncols A)\<rbrakk> \<Longrightarrow> ?B' = ?P' ** A ** ?Q' \<and> invertible ?P' \<and> invertible ?Q' \<and> ?B' = diagonal_to_Smith_i ?xs B ?i bezout

goal (1 subgoal):
 1. B' = diagonal_to_Smith_i [i + 1..<min (nrows B) (ncols B)] B i bezout
[PROOF STEP]
by (auto simp add: nrows_def ncols_def)


[STATEMENT]
lemma spanning_surjective_image:
  assumes us: "UNIV \<subseteq> m1.span S"
    and sf: "surj f"
  shows "UNIV \<subseteq> m2.span (f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
have "UNIV \<subseteq> f ` UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV \<subseteq> range f
[PROOF STEP]
using sf
[PROOF STATE]
proof (prove)
using this:
surj f

goal (1 subgoal):
 1. UNIV \<subseteq> range f
[PROOF STEP]
by (auto simp add: surj_def)
[PROOF STATE]
proof (state)
this:
UNIV \<subseteq> range f

goal (1 subgoal):
 1. UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
UNIV \<subseteq> range f

goal (1 subgoal):
 1. UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
have " \<dots> \<subseteq> m2.span (f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range f \<subseteq> m2.span (f ` S)
[PROOF STEP]
using spans_image[OF us]
[PROOF STATE]
proof (prove)
using this:
range f \<subseteq> m2.span (f ` S)

goal (1 subgoal):
 1. range f \<subseteq> m2.span (f ` S)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
range f \<subseteq> m2.span (f ` S)

goal (1 subgoal):
 1. UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
UNIV \<subseteq> m2.span (f ` S)

goal (1 subgoal):
 1. UNIV \<subseteq> m2.span (f ` S)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
UNIV \<subseteq> m2.span (f ` S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma positive_gauss_norm_eval:
  assumes "g \<in> carrier Q\<^sub>p_x"
  assumes "gauss_norm g \<ge> 0"
  assumes "a \<in> \<O>\<^sub>p"
  shows "(g\<bullet>a) \<in> \<O>\<^sub>p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<bullet> a \<in> \<O>\<^sub>p
[PROOF STEP]
apply(rule val_ring_val_criterion[of "g\<bullet>a"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. g \<bullet> a \<in> carrier Q\<^sub>p
 2. 0 \<le> val (g \<bullet> a)
[PROOF STEP]
using assms val_ring_memE
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier (UP Q\<^sub>p)
0 \<le> gauss_norm g
a \<in> \<O>\<^sub>p
?a \<in> \<O>\<^sub>p \<Longrightarrow> 0 \<le> val ?a
?a \<in> \<O>\<^sub>p \<Longrightarrow> ?a \<in> carrier Q\<^sub>p

goal (2 subgoals):
 1. g \<bullet> a \<in> carrier Q\<^sub>p
 2. 0 \<le> val (g \<bullet> a)
[PROOF STEP]
using UPQ.to_fun_closed
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier (UP Q\<^sub>p)
0 \<le> gauss_norm g
a \<in> \<O>\<^sub>p
?a \<in> \<O>\<^sub>p \<Longrightarrow> 0 \<le> val ?a
?a \<in> \<O>\<^sub>p \<Longrightarrow> ?a \<in> carrier Q\<^sub>p
\<lbrakk>?f \<in> carrier (UP Q\<^sub>p); ?x \<in> carrier Q\<^sub>p\<rbrakk> \<Longrightarrow> ?f \<bullet> ?x \<in> carrier Q\<^sub>p

goal (2 subgoals):
 1. g \<bullet> a \<in> carrier Q\<^sub>p
 2. 0 \<le> val (g \<bullet> a)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> val (g \<bullet> a)
[PROOF STEP]
using assms val_gauss_norm_eval[of g a]
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier (UP Q\<^sub>p)
0 \<le> gauss_norm g
a \<in> \<O>\<^sub>p
\<lbrakk>g \<in> carrier (UP Q\<^sub>p); a \<in> \<O>\<^sub>p\<rbrakk> \<Longrightarrow> gauss_norm g \<le> val (g \<bullet> a)

goal (1 subgoal):
 1. 0 \<le> val (g \<bullet> a)
[PROOF STEP]
by auto