[STATEMENT]
lemma (in linorder_topology) tendsto_max[tendsto_intros]:
  assumes X: "(X \<longlongrightarrow> x) net"
    and Y: "(Y \<longlongrightarrow> y) net"
  shows "((\<lambda>x. max (X x) (Y x)) \<longlongrightarrow> max x y) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. max (X x) (Y x)) \<longlongrightarrow> max x y) net
[PROOF STEP]
proof (rule order_tendstoI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a < max x y \<Longrightarrow> \<forall>\<^sub>F x in net. a < max (X x) (Y x)
 2. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a < max x y \<Longrightarrow> \<forall>\<^sub>F x in net. a < max (X x) (Y x)
 2. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
assume "a < max x y"
[PROOF STATE]
proof (state)
this:
a < max x y

goal (2 subgoals):
 1. \<And>a. a < max x y \<Longrightarrow> \<forall>\<^sub>F x in net. a < max (X x) (Y x)
 2. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a < max x y
[PROOF STEP]
show "eventually (\<lambda>x. a < max (X x) (Y x)) net"
[PROOF STATE]
proof (prove)
using this:
a < max x y

goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. a < max (X x) (Y x)
[PROOF STEP]
using order_tendstoD(1)[OF X, of a] order_tendstoD(1)[OF Y, of a]
[PROOF STATE]
proof (prove)
using this:
a < max x y
a < x \<Longrightarrow> \<forall>\<^sub>F x in net. a < X x
a < y \<Longrightarrow> \<forall>\<^sub>F x in net. a < Y x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. a < max (X x) (Y x)
[PROOF STEP]
by (auto simp: less_max_iff_disj elim: eventually_mono)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in net. a < max (X x) (Y x)

goal (1 subgoal):
 1. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
assume "max x y < a"
[PROOF STATE]
proof (state)
this:
max x y < a

goal (1 subgoal):
 1. \<And>a. max x y < a \<Longrightarrow> \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
max x y < a
[PROOF STEP]
show "eventually (\<lambda>x. max (X x) (Y x) < a) net"
[PROOF STATE]
proof (prove)
using this:
max x y < a

goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
using order_tendstoD(2)[OF X, of a] order_tendstoD(2)[OF Y, of a]
[PROOF STATE]
proof (prove)
using this:
max x y < a
x < a \<Longrightarrow> \<forall>\<^sub>F x in net. X x < a
y < a \<Longrightarrow> \<forall>\<^sub>F x in net. Y x < a

goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. max (X x) (Y x) < a
[PROOF STEP]
by (auto simp: eventually_conj_iff)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in net. max (X x) (Y x) < a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma loxodromic_attracting_fixed_point_attracts:
  assumes "loxodromic_isometry f"
          "xi \<noteq> repelling_fixed_point f"
  shows "(\<lambda>n. ((Gromov_extension f)^^n) xi) \<longlonglongrightarrow> attracting_fixed_point f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (Gromov_extension f ^^ n) xi) \<longlonglongrightarrow> attracting_fixed_point f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. (Gromov_extension f ^^ n) xi) \<longlonglongrightarrow> attracting_fixed_point f
[PROOF STEP]
have "(\<lambda>n. extended_Gromov_product_at basepoint (((Gromov_extension f)^^n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>
[PROOF STEP]
unfolding Lim_PInfty
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>B. \<exists>N. \<forall>n\<ge>N. ereal B \<le> extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)
[PROOF STEP]
using loxodromic_attracting_fixed_point_attracts_uniformly[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<exists>N. \<forall>n\<ge>N. \<forall>x. extended_Gromov_product_at basepoint x (repelling_fixed_point f) \<le> ereal ?K \<longrightarrow> ereal ?M \<le> extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) x) (attracting_fixed_point f)

goal (1 subgoal):
 1. \<forall>B. \<exists>N. \<forall>n\<ge>N. ereal B \<le> extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)
[PROOF STEP]
by auto (metis Gromov_boundary_extended_product_PInf assms(2) dual_order.refl real_le_ereal_iff real_of_ereal_le_0 zero_ereal_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>

goal (1 subgoal):
 1. (\<lambda>n. (Gromov_extension f ^^ n) xi) \<longlonglongrightarrow> attracting_fixed_point f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>

goal (1 subgoal):
 1. (\<lambda>n. (Gromov_extension f ^^ n) xi) \<longlonglongrightarrow> attracting_fixed_point f
[PROOF STEP]
unfolding Gromov_completion_boundary_limit[OF loxodromic_attracting_fixed_point(1)[OF assms(1)]]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>

goal (1 subgoal):
 1. (\<lambda>n. extended_Gromov_product_at basepoint ((Gromov_extension f ^^ n) xi) (attracting_fixed_point f)) \<longlonglongrightarrow> \<infinity>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (Gromov_extension f ^^ n) xi) \<longlonglongrightarrow> attracting_fixed_point f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma distinct_mset_union_mset[simp]:
  \<open>distinct_mset (D \<union># C) \<longleftrightarrow> distinct_mset D \<and> distinct_mset C\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct_mset (D \<union># C) = (distinct_mset D \<and> distinct_mset C)
[PROOF STEP]
unfolding distinct_mset_count_less_1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a. count (D \<union># C) a \<le> 1) = ((\<forall>a. count D a \<le> 1) \<and> (\<forall>a. count C a \<le> 1))
[PROOF STEP]
by force


[STATEMENT]
lemma reduction_subsets_is_get_subsets: "reduction_subsets p qs signs subsets m =  get_subsets (reduce_system p (qs, (m, (subsets, signs))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. reduction_subsets p qs signs subsets m = get_subsets (reduce_system p (qs, m, subsets, signs))
[PROOF STEP]
unfolding reduction_subsets_def get_subsets_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_indices subsets (rows_to_keep (reduce_mat_cols m (solve_for_lhs p qs subsets m))) = fst (snd (reduce_system p (qs, m, subsets, signs)))
[PROOF STEP]
by (metis fst_conv reduce_system.simps reduction_step.elims snd_conv)


[STATEMENT]
lemma vcard_disjoint_sup:
  assumes "x \<sqinter> y = 0" shows "vcard (x \<squnion> y) = vcard x \<oplus> vcard y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vcard (x \<squnion> y) = vcard x \<oplus> vcard y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. vcard (x \<squnion> y) = vcard x \<oplus> vcard y
[PROOF STEP]
have "elts (x \<squnion> y) \<approx> elts (x \<Uplus> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elts (x \<squnion> y) \<approx> elts (x \<Uplus> y)
[PROOF STEP]
unfolding eqpoll_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>f. bij_betw f (elts (x \<squnion> y)) (elts (x \<Uplus> y))
[PROOF STEP]
proof (rule exI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bij_betw ?f (elts (x \<squnion> y)) (elts (x \<Uplus> y))
[PROOF STEP]
let ?f = "\<lambda>z. if z \<in> elts x then Inl z else Inr z"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bij_betw ?f (elts (x \<squnion> y)) (elts (x \<Uplus> y))
[PROOF STEP]
let ?g = "sum_case id id"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bij_betw ?f (elts (x \<squnion> y)) (elts (x \<Uplus> y))
[PROOF STEP]
show "bij_betw ?f (elts (x \<squnion> y)) (elts (x \<Uplus> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (\<lambda>z. if z \<in> elts x then ZFC_Cardinals.Inl z else ZFC_Cardinals.Inr z) (elts (x \<squnion> y)) (elts (x \<Uplus> y))
[PROOF STEP]
by (rule bij_betw_byWitness [where f' = ?g]) (use assms V_disjoint_iff in auto)
[PROOF STATE]
proof (state)
this:
bij_betw (\<lambda>z. if z \<in> elts x then ZFC_Cardinals.Inl z else ZFC_Cardinals.Inr z) (elts (x \<squnion> y)) (elts (x \<Uplus> y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
elts (x \<squnion> y) \<approx> elts (x \<Uplus> y)

goal (1 subgoal):
 1. vcard (x \<squnion> y) = vcard x \<oplus> vcard y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
elts (x \<squnion> y) \<approx> elts (x \<Uplus> y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
elts (x \<squnion> y) \<approx> elts (x \<Uplus> y)

goal (1 subgoal):
 1. vcard (x \<squnion> y) = vcard x \<oplus> vcard y
[PROOF STEP]
by (metis cadd_commute cadd_def cardinal_cong cardinal_idem vsum_0_eqpoll cadd_assoc)
[PROOF STATE]
proof (state)
this:
vcard (x \<squnion> y) = vcard x \<oplus> vcard y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem n_subsets:
  assumes "finite A"
  shows "card {B. B \<subseteq> A \<and> card B = k} = card A choose k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite A
[PROOF STEP]
obtain f where bij: "bij_betw f {0..<card A} A"
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. (\<And>f. bij_betw f {0..<card A} A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (blast dest: ex_bij_betw_nat_finite)
[PROOF STATE]
proof (state)
this:
bij_betw f {0..<card A} A

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bij_betw f {0..<card A} A
[PROOF STEP]
have [simp]: "card (f ` C) = card C" if "C \<subseteq> {0..<card A}" for C
[PROOF STATE]
proof (prove)
using this:
bij_betw f {0..<card A} A

goal (1 subgoal):
 1. card (f ` C) = card C
[PROOF STEP]
by (meson bij_betw_imp_inj_on bij_betw_subset card_image that)
[PROOF STATE]
proof (state)
this:
?C \<subseteq> {0..<card A} \<Longrightarrow> card (f ` ?C) = card ?C

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
from bij
[PROOF STATE]
proof (chain)
picking this:
bij_betw f {0..<card A} A
[PROOF STEP]
have "bij_betw (image f) (Pow {0..<card A}) (Pow A)"
[PROOF STATE]
proof (prove)
using this:
bij_betw f {0..<card A} A

goal (1 subgoal):
 1. bij_betw ((`) f) (Pow {0..<card A}) (Pow A)
[PROOF STEP]
by (rule bij_betw_Pow)
[PROOF STATE]
proof (state)
this:
bij_betw ((`) f) (Pow {0..<card A}) (Pow A)

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bij_betw ((`) f) (Pow {0..<card A}) (Pow A)
[PROOF STEP]
have "inj_on (image f) (Pow {0..<card A})"
[PROOF STATE]
proof (prove)
using this:
bij_betw ((`) f) (Pow {0..<card A}) (Pow A)

goal (1 subgoal):
 1. inj_on ((`) f) (Pow {0..<card A})
[PROOF STEP]
by (rule bij_betw_imp_inj_on)
[PROOF STATE]
proof (state)
this:
inj_on ((`) f) (Pow {0..<card A})

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inj_on ((`) f) (Pow {0..<card A})

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
have "{K. K \<subseteq> {0..<card A} \<and> card K = k} \<subseteq> Pow {0..<card A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {K. K \<subseteq> {0..<card A} \<and> card K = k} \<subseteq> Pow {0..<card A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{K. K \<subseteq> {0..<card A} \<and> card K = k} \<subseteq> Pow {0..<card A}

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inj_on ((`) f) (Pow {0..<card A})
{K. K \<subseteq> {0..<card A} \<and> card K = k} \<subseteq> Pow {0..<card A}
[PROOF STEP]
have "inj_on (image f) {K. K \<subseteq> {0..<card A} \<and> card K = k}"
[PROOF STATE]
proof (prove)
using this:
inj_on ((`) f) (Pow {0..<card A})
{K. K \<subseteq> {0..<card A} \<and> card K = k} \<subseteq> Pow {0..<card A}

goal (1 subgoal):
 1. inj_on ((`) f) {K. K \<subseteq> {0..<card A} \<and> card K = k}
[PROOF STEP]
by (rule inj_on_subset)
[PROOF STATE]
proof (state)
this:
inj_on ((`) f) {K. K \<subseteq> {0..<card A} \<and> card K = k}

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on ((`) f) {K. K \<subseteq> {0..<card A} \<and> card K = k}
[PROOF STEP]
have "card {K. K \<subseteq> {0..<card A} \<and> card K = k} =
      card (image f ` {K. K \<subseteq> {0..<card A} \<and> card K = k})" (is "_ = card ?C")
[PROOF STATE]
proof (prove)
using this:
inj_on ((`) f) {K. K \<subseteq> {0..<card A} \<and> card K = k}

goal (1 subgoal):
 1. card {K. K \<subseteq> {0..<card A} \<and> card K = k} = card ((`) f ` {K. K \<subseteq> {0..<card A} \<and> card K = k})
[PROOF STEP]
by (simp add: card_image)
[PROOF STATE]
proof (state)
this:
card {K. K \<subseteq> {0..<card A} \<and> card K = k} = card ((`) f ` {K. K \<subseteq> {0..<card A} \<and> card K = k})

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card {K. K \<subseteq> {0..<card A} \<and> card K = k} = card ((`) f ` {K. K \<subseteq> {0..<card A} \<and> card K = k})

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
have "?C = {K. K \<subseteq> f ` {0..<card A} \<and> card K = k}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (`) f ` {K. K \<subseteq> {0..<card A} \<and> card K = k} = {K. K \<subseteq> f ` {0..<card A} \<and> card K = k}
[PROOF STEP]
by (auto elim!: subset_imageE)
[PROOF STATE]
proof (state)
this:
(`) f ` {K. K \<subseteq> {0..<card A} \<and> card K = k} = {K. K \<subseteq> f ` {0..<card A} \<and> card K = k}

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(`) f ` {K. K \<subseteq> {0..<card A} \<and> card K = k} = {K. K \<subseteq> f ` {0..<card A} \<and> card K = k}

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
have "f ` {0..<card A} = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` {0..<card A} = A
[PROOF STEP]
by (meson bij bij_betw_def)
[PROOF STATE]
proof (state)
this:
f ` {0..<card A} = A

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card {K. K \<subseteq> {0..<card A} \<and> card K = k} = card {K. K \<subseteq> A \<and> card K = k}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card {K. K \<subseteq> {0..<card A} \<and> card K = k} = card {K. K \<subseteq> A \<and> card K = k}

goal (1 subgoal):
 1. card {B. B \<subseteq> A \<and> card B = k} = card A choose k
[PROOF STEP]
by (simp add: binomial_def)
[PROOF STATE]
proof (state)
this:
card {B. B \<subseteq> A \<and> card B = k} = card A choose k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tagged_division_ofD[dest]:  (*FIXME USE A LOCALE*)
  assumes "s tagged_division_of i"
  shows "finite s"
    and "\<And>x K. (x,K) \<in> s \<Longrightarrow> x \<in> K"
    and "\<And>x K. (x,K) \<in> s \<Longrightarrow> K \<subseteq> i"
    and "\<And>x K. (x,K) \<in> s \<Longrightarrow> \<exists>a b. K = cbox a b"
    and "\<And>x1 K1 x2 K2. (x1, K1) \<in> s \<Longrightarrow> (x2, K2) \<in> s \<Longrightarrow> (x1, K1) \<noteq> (x2, K2) \<Longrightarrow>
      interior K1 \<inter> interior K2 = {}"
    and "(\<Union>{K. \<exists>x. (x,K) \<in> s} = i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (finite s &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> x \<in> K) &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> K \<subseteq> i)) &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> \<exists>a b. K = cbox a b) &&& (\<And>x1 K1 x2 K2. \<lbrakk>(x1, K1) \<in> s; (x2, K2) \<in> s; (x1, K1) \<noteq> (x2, K2)\<rbrakk> \<Longrightarrow> interior K1 \<inter> interior K2 = {}) &&& \<Union> {K. \<exists>x. (x, K) \<in> s} = i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
s tagged_division_of i

goal (1 subgoal):
 1. (finite s &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> x \<in> K) &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> K \<subseteq> i)) &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> \<exists>a b. K = cbox a b) &&& (\<And>x1 K1 x2 K2. \<lbrakk>(x1, K1) \<in> s; (x2, K2) \<in> s; (x1, K1) \<noteq> (x2, K2)\<rbrakk> \<Longrightarrow> interior K1 \<inter> interior K2 = {}) &&& \<Union> {K. \<exists>x. (x, K) \<in> s} = i
[PROOF STEP]
unfolding tagged_division_of
[PROOF STATE]
proof (prove)
using this:
finite s \<and> (\<forall>x K. (x, K) \<in> s \<longrightarrow> x \<in> K \<and> K \<subseteq> i \<and> (\<exists>a b. K = cbox a b)) \<and> (\<forall>x1 K1 x2 K2. (x1, K1) \<in> s \<and> (x2, K2) \<in> s \<and> (x1, K1) \<noteq> (x2, K2) \<longrightarrow> interior K1 \<inter> interior K2 = {}) \<and> \<Union> {K. \<exists>x. (x, K) \<in> s} = i

goal (1 subgoal):
 1. (finite s &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> x \<in> K) &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> K \<subseteq> i)) &&& (\<And>x K. (x, K) \<in> s \<Longrightarrow> \<exists>a b. K = cbox a b) &&& (\<And>x1 K1 x2 K2. \<lbrakk>(x1, K1) \<in> s; (x2, K2) \<in> s; (x1, K1) \<noteq> (x2, K2)\<rbrakk> \<Longrightarrow> interior K1 \<inter> interior K2 = {}) &&& \<Union> {K. \<exists>x. (x, K) \<in> s} = i
[PROOF STEP]
by blast+


[STATEMENT]
lemma length_disj_filter_le: "\<forall>x \<in> set xs. \<not>(P x \<and> Q x) \<Longrightarrow>
 length(filter P xs) + length(filter Q xs) \<le> length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>set xs. \<not> (P x \<and> Q x) \<Longrightarrow> |filter P xs| + |filter Q xs| \<le> |xs|
[PROOF STEP]
by(induct xs) auto


[STATEMENT]
lemma NSconvergent_NSCauchy: "NSconvergent X \<Longrightarrow> NSCauchy X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NSconvergent X \<Longrightarrow> NSCauchy X
[PROOF STEP]
by (simp add: NSconvergent_def NSLIMSEQ_def NSCauchy_def) (auto intro: approx_trans2)


[STATEMENT]
lemma contour_integrable_add:
    "\<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x + f2 x) contour_integrable_on g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x + f2 x) contour_integrable_on g
[PROOF STEP]
using has_contour_integral_add contour_integrable_on_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(?f1.0 has_contour_integral ?i1.0) ?g; (?f2.0 has_contour_integral ?i2.0) ?g\<rbrakk> \<Longrightarrow> ((\<lambda>x. ?f1.0 x + ?f2.0 x) has_contour_integral ?i1.0 + ?i2.0) ?g
?f contour_integrable_on ?g \<equiv> \<exists>i. (?f has_contour_integral i) ?g

goal (1 subgoal):
 1. \<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x + f2 x) contour_integrable_on g
[PROOF STEP]
by fastforce


[STATEMENT]
lemma (in order) mono_onD [dest?]:
  fixes f :: "'a \<Rightarrow> 'b::order"
  shows "mono_on f X \<Longrightarrow> x \<in> X \<Longrightarrow> y \<in> X \<Longrightarrow> x \<le> y \<Longrightarrow> f x \<le> f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>order_class.mono_on f X; x \<in> X; y \<in> X; x \<le> y\<rbrakk> \<Longrightarrow> f x \<le> f y
[PROOF STEP]
unfolding mono_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>X. \<forall>y\<in>X. x \<le> y \<longrightarrow> f x \<le> f y; x \<in> X; y \<in> X; x \<le> y\<rbrakk> \<Longrightarrow> f x \<le> f y
[PROOF STEP]
by simp


[STATEMENT]
lemma conv_radius_mult_power:
  assumes "c \<noteq> (0 :: 'a :: {real_normed_div_algebra,banach})"
  shows   "conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
have "limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) =
          limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n))))
[PROOF STEP]
by (intro Limsup_eq eventually_mono [OF eventually_gt_at_top[of "0::nat"]])
       (auto simp: norm_mult norm_power real_root_mult real_root_power)
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
have "\<dots> = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
c \<noteq> (0::'a)

goal (1 subgoal):
 1. limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))
[PROOF STEP]
by (subst Limsup_ereal_mult_left[symmetric]) simp_all
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>n. ereal (norm c) * ereal (root n (norm (f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))
[PROOF STEP]
have A: "limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) =
                       ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
using this:
limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))

goal (1 subgoal):
 1. limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>n. ereal (root n (norm (c ^ n * f n)))) = ereal (norm c) * limsup (\<lambda>n. ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
c \<noteq> (0::'a)

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
apply (cases "limsup (\<lambda>n. ereal (root n (norm (f n)))) = 0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>c \<noteq> (0::'a); limsup (\<lambda>n. ereal (root n (norm (f n)))) = 0\<rbrakk> \<Longrightarrow> conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
 2. \<lbrakk>c \<noteq> (0::'a); limsup (\<lambda>n. ereal (root n (norm (f n)))) \<noteq> 0\<rbrakk> \<Longrightarrow> conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
apply (simp add: A conv_radius_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c \<noteq> (0::'a); limsup (\<lambda>n. ereal (root n (norm (f n)))) \<noteq> 0\<rbrakk> \<Longrightarrow> conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)
[PROOF STEP]
apply (unfold conv_radius_def A divide_ereal_def, simp add: mult.commute ereal_inverse_mult)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
conv_radius (\<lambda>n. c ^ n * f n) = conv_radius f / ereal (norm c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma order_unique_lemma:
  fixes p :: "'a::idom poly"
  assumes "[:-a, 1:] ^ n dvd p" "\<not> [:-a, 1:] ^ Suc n dvd p"
  shows "order a p = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order a p = n
[PROOF STEP]
unfolding Polynomial.order_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LEAST n. \<not> [:- a, 1::'a:] ^ Suc n dvd p) = n
[PROOF STEP]
by (metis (mono_tags, lifting) Least_equality assms not_less_eq_eq power_le_dvd)


[STATEMENT]
lemma (in group) iso_iff_group_isomorphisms:
  "f \<in> iso G H \<longleftrightarrow> (\<exists>g. group_isomorphisms G H f g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> Group.iso G H) = (\<exists>g. group_isomorphisms G H f g)
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f \<in> Group.iso G H \<Longrightarrow> \<exists>g. group_isomorphisms G H f g
 2. \<And>g. group_isomorphisms G H f g \<Longrightarrow> f \<in> Group.iso G H
[PROOF STEP]
show "\<exists>g. group_isomorphisms G H f g" if "f \<in> Group.iso G H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>g. group_isomorphisms G H f g
[PROOF STEP]
unfolding group_isomorphisms_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>g. f \<in> hom G H \<and> g \<in> hom H G \<and> (\<forall>x\<in>carrier G. g (f x) = x) \<and> (\<forall>y\<in>carrier H. f (g y) = y)
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. f \<in> hom G H
 2. ?g \<in> hom H G
 3. \<forall>x\<in>carrier G. ?g (f x) = x
 4. \<forall>y\<in>carrier H. f (?g y) = y
[PROOF STEP]
let ?g = "inv_into (carrier G) f"
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. f \<in> hom G H
 2. ?g \<in> hom H G
 3. \<forall>x\<in>carrier G. ?g (f x) = x
 4. \<forall>y\<in>carrier H. f (?g y) = y
[PROOF STEP]
show "\<forall>x\<in>carrier G. ?g (f x) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>carrier G. inv_into (carrier G) f (f x) = x
[PROOF STEP]
by (metis (no_types, lifting) Group.iso_def bij_betw_inv_into_left mem_Collect_eq that)
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>carrier G. inv_into (carrier G) f (f x) = x

goal (3 subgoals):
 1. f \<in> hom G H
 2. inv_into (carrier G) f \<in> hom H G
 3. \<forall>y\<in>carrier H. f (inv_into (carrier G) f y) = y
[PROOF STEP]
show "\<forall>y\<in>carrier H. f (?g y) = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y\<in>carrier H. f (inv_into (carrier G) f y) = y
[PROOF STEP]
by (metis (no_types, lifting) Group.iso_def bij_betw_inv_into_right mem_Collect_eq that)
[PROOF STATE]
proof (state)
this:
\<forall>y\<in>carrier H. f (inv_into (carrier G) f y) = y

goal (2 subgoals):
 1. f \<in> hom G H
 2. inv_into (carrier G) f \<in> hom H G
[PROOF STEP]
qed (use Group.iso_def iso_set_sym that in \<open>blast+\<close>)
[PROOF STATE]
proof (state)
this:
f \<in> Group.iso G H \<Longrightarrow> \<exists>g. group_isomorphisms G H f g

goal (1 subgoal):
 1. \<And>g. group_isomorphisms G H f g \<Longrightarrow> f \<in> Group.iso G H
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>g. group_isomorphisms G H f g \<Longrightarrow> f \<in> Group.iso G H
[PROOF STEP]
fix g
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>g. group_isomorphisms G H f g \<Longrightarrow> f \<in> Group.iso G H
[PROOF STEP]
assume "group_isomorphisms G H f g"
[PROOF STATE]
proof (state)
this:
group_isomorphisms G H f g

goal (1 subgoal):
 1. \<And>g. group_isomorphisms G H f g \<Longrightarrow> f \<in> Group.iso G H
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
group_isomorphisms G H f g
[PROOF STEP]
show "f \<in> Group.iso G H"
[PROOF STATE]
proof (prove)
using this:
group_isomorphisms G H f g

goal (1 subgoal):
 1. f \<in> Group.iso G H
[PROOF STEP]
by (auto simp: iso_def group_isomorphisms_def hom_in_carrier intro: bij_betw_byWitness)
[PROOF STATE]
proof (state)
this:
f \<in> Group.iso G H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem r_univ':
  assumes "recfn (e_length x) f"
  shows "eval r_univ [encode f, x] = eval f (list_decode x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval r_univ [encode f, x] = eval f (Partial_Recursive.list_decode x)
[PROOF STEP]
using r_univ assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i = encode ?f; recfn (e_length ?x) ?f\<rbrakk> \<Longrightarrow> eval r_univ [?i, ?x] = eval ?f (Partial_Recursive.list_decode ?x)
recfn (e_length x) f

goal (1 subgoal):
 1. eval r_univ [encode f, x] = eval f (Partial_Recursive.list_decode x)
[PROOF STEP]
by simp


[STATEMENT]
lemma asymp_equiv_at_top_imp_at_left_0:
  "(\<lambda>x. f (-inverse x)) \<sim>[at_top] (\<lambda>x. g (-inverse x)) \<Longrightarrow> f \<sim>[at_left 0] g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f (- inverse x)) \<sim>[at_top] (\<lambda>x. g (- inverse x)) \<Longrightarrow> f \<sim>[at_left 0] g
[PROOF STEP]
by (simp add: at_left_to_top asymp_equiv_filtermap_iff)


[STATEMENT]
lemma det_mk_poly_sub:
  assumes A: "(A :: 'a :: comm_ring_1 poly mat) \<in> carrier_mat n n" and i: "i < n"
  shows "det (mk_poly_sub A (n-1) i) = det A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < n

goal (1 subgoal):
 1. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
proof (induct i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < n \<Longrightarrow> det (mk_poly_sub A (n - 1) 0) = det A
 2. \<And>i. \<lbrakk>i < n \<Longrightarrow> det (mk_poly_sub A (n - 1) i) = det A; Suc i < n\<rbrakk> \<Longrightarrow> det (mk_poly_sub A (n - 1) (Suc i)) = det A
[PROOF STEP]
case (Suc i)
[PROOF STATE]
proof (state)
this:
i < n \<Longrightarrow> det (mk_poly_sub A (n - 1) i) = det A
Suc i < n

goal (2 subgoals):
 1. 0 < n \<Longrightarrow> det (mk_poly_sub A (n - 1) 0) = det A
 2. \<And>i. \<lbrakk>i < n \<Longrightarrow> det (mk_poly_sub A (n - 1) i) = det A; Suc i < n\<rbrakk> \<Longrightarrow> det (mk_poly_sub A (n - 1) (Suc i)) = det A
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (mk_poly_sub A (n - 1) (Suc i)) = det A
[PROOF STEP]
unfolding mk_poly_sub.simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (addcol (monom (1::'a) (Suc i)) (n - 1) (n - 1 - Suc i) (mk_poly_sub A (n - 1) i)) = det A
[PROOF STEP]
apply(subst det_addcol[of _ n])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. n - 1 - Suc i < n
 2. n - 1 \<noteq> n - 1 - Suc i
 3. mk_poly_sub A (n - 1) i \<in> carrier_mat n n
 4. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
i < n \<Longrightarrow> det (mk_poly_sub A (n - 1) i) = det A
Suc i < n

goal (4 subgoals):
 1. n - 1 - Suc i < n
 2. n - 1 \<noteq> n - 1 - Suc i
 3. mk_poly_sub A (n - 1) i \<in> carrier_mat n n
 4. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. n - 1 \<noteq> n - 1 - Suc i
 2. mk_poly_sub A (n - 1) i \<in> carrier_mat n n
 3. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
i < n \<Longrightarrow> det (mk_poly_sub A (n - 1) i) = det A
Suc i < n

goal (3 subgoals):
 1. n - 1 \<noteq> n - 1 - Suc i
 2. mk_poly_sub A (n - 1) i \<in> carrier_mat n n
 3. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. mk_poly_sub A (n - 1) i \<in> carrier_mat n n
 2. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
apply (rule mk_poly_sub_carrier[OF A])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
i < n \<Longrightarrow> det (mk_poly_sub A (n - 1) i) = det A
Suc i < n

goal (1 subgoal):
 1. det (mk_poly_sub A (n - 1) i) = det A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
det (mk_poly_sub A (n - 1) (Suc i)) = det A

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> det (mk_poly_sub A (n - 1) 0) = det A
[PROOF STEP]
qed simp


[STATEMENT]
lemma sum_list_sets_single : "(\<Sum>X\<leftarrow>[A]. X) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>X\<leftarrow>[A]. X) = A
[PROOF STEP]
using add_0_right[of A]
[PROOF STATE]
proof (prove)
using this:
A + (0::'a) = A

goal (1 subgoal):
 1. (\<Sum>X\<leftarrow>[A]. X) = A
[PROOF STEP]
by simp


[STATEMENT]
lemma lm02: assumes "finite X"
            shows   "trivial X=(card X \<le> 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial X = (card X \<le> 1)
[PROOF STEP]
using assms One_nat_def card.empty card_insert_if card_mono card_seteq empty_iff
            empty_subsetI finite.cases finite.emptyI finite_insert insert_mono
            trivial_def trivial_singleton
[PROOF STATE]
proof (prove)
using this:
finite X
1 = Suc 0
card {} = 0
finite ?A \<Longrightarrow> card (insert ?x ?A) = (if ?x \<in> ?A then card ?A else Suc (card ?A))
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
\<lbrakk>finite ?B; ?A \<subseteq> ?B; card ?B \<le> card ?A\<rbrakk> \<Longrightarrow> ?A = ?B
(?c \<in> {}) = False
{} \<subseteq> ?A
\<lbrakk>finite ?a; ?a = {} \<Longrightarrow> ?P; \<And>A a. \<lbrakk>?a = insert a A; finite A\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
finite {}
finite (insert ?a ?A) = finite ?A
?C \<subseteq> ?D \<Longrightarrow> insert ?a ?C \<subseteq> insert ?a ?D
trivial ?x = (?x \<subseteq> {the_elem ?x})
trivial {?x}

goal (1 subgoal):
 1. trivial X = (card X \<le> 1)
[PROOF STEP]
by (metis(no_types))


[STATEMENT]
lemma isGlb_glb: "(\<exists>G. isGlb S cl G) \<longleftrightarrow> isGlb S cl (glb S cl)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>G. isGlb S cl G) = isGlb S cl (glb S cl)
[PROOF STEP]
by (simp add: glb_def greatest_def isGlb_def some_eq_ex [symmetric])


[STATEMENT]
lemma small_nstep_SucD:
assumes "\<sigma>' \<in> small_nstep P \<sigma> (Suc n)"
shows "\<exists>\<sigma>1. \<sigma>1 \<in> small P \<sigma> \<and> \<sigma>' \<in> small_nstep P \<sigma>1 n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<sigma>1. \<sigma>1 \<in> small P \<sigma> \<and> \<sigma>' \<in> small_nstep P \<sigma>1 n
[PROOF STEP]
using small_nstep_Rec2 case_prodD assms
[PROOF STATE]
proof (prove)
using this:
small_nstep ?P ?\<sigma> (Suc ?n) = {\<sigma>2. \<exists>\<sigma>1. \<sigma>1 \<in> small ?P ?\<sigma> \<and> \<sigma>2 \<in> small_nstep ?P \<sigma>1 ?n}
case (?a, ?b) of (c, d) \<Rightarrow> ?f c d \<Longrightarrow> ?f ?a ?b
\<sigma>' \<in> small_nstep P \<sigma> (Suc n)

goal (1 subgoal):
 1. \<exists>\<sigma>1. \<sigma>1 \<in> small P \<sigma> \<and> \<sigma>' \<in> small_nstep P \<sigma>1 n
[PROOF STEP]
by fastforce


[STATEMENT]
lemma finite_card_set_comp: "finite M \<Longrightarrow> card {(k,j) |j. j \<in> M} = card M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite M \<Longrightarrow> card {(k, j) |j. j \<in> M} = card M
[PROOF STEP]
proof (induction M rule: finite_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. card {(k, j) |j. j \<in> {}} = card {}
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; card {(k, j) |j. j \<in> F} = card F\<rbrakk> \<Longrightarrow> card {(k, j) |j. j \<in> insert x F} = card (insert x F)
[PROOF STEP]
case (insert x M)
[PROOF STATE]
proof (state)
this:
finite M
x \<notin> M
card {(k, j) |j. j \<in> M} = card M

goal (2 subgoals):
 1. card {(k, j) |j. j \<in> {}} = card {}
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; card {(k, j) |j. j \<in> F} = card F\<rbrakk> \<Longrightarrow> card {(k, j) |j. j \<in> insert x F} = card (insert x F)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite M
x \<notin> M
card {(k, j) |j. j \<in> M} = card M
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite M
x \<notin> M
card {(k, j) |j. j \<in> M} = card M

goal (1 subgoal):
 1. card {(k, j) |j. j \<in> insert x M} = card (insert x M)
[PROOF STEP]
using set_comp_ins[of k x M]
[PROOF STATE]
proof (prove)
using this:
finite M
x \<notin> M
card {(k, j) |j. j \<in> M} = card M
{(k, j) |j. j \<in> insert x M} = insert (k, x) {(k, j) |j. j \<in> M}

goal (1 subgoal):
 1. card {(k, j) |j. j \<in> insert x M} = card (insert x M)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card {(k, j) |j. j \<in> insert x M} = card (insert x M)

goal (1 subgoal):
 1. card {(k, j) |j. j \<in> {}} = card {}
[PROOF STEP]
qed auto


[STATEMENT]
lemma trans_mat_point_index_inter_sym:
  "i1 < dim_row M \<Longrightarrow> i2 < dim_row M \<Longrightarrow> mat_point_index M {i1, i2} = mat_inter_num M\<^sup>T i1 i2"
  "j1 < dim_col M \<Longrightarrow> j2 < dim_col M \<Longrightarrow> mat_inter_num M j1 j2 = mat_point_index M\<^sup>T {j1, j2}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk>i1 < dim_row M; i2 < dim_row M\<rbrakk> \<Longrightarrow> mat_point_index M {i1, i2} = mat_inter_num M\<^sup>T i1 i2) &&& (\<lbrakk>j1 < dim_col M; j2 < dim_col M\<rbrakk> \<Longrightarrow> mat_inter_num M j1 j2 = mat_point_index M\<^sup>T {j1, j2})
[PROOF STEP]
apply (simp_all add: mat_inter_num_def mat_point_index_two_alt)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>i1 < dim_row M; i2 < dim_row M\<rbrakk> \<Longrightarrow> card {j. j < dim_col M \<and> M $$ (i1, j) = (1::'a) \<and> M $$ (i2, j) = (1::'a)} = card {i. i < dim_col M \<and> M\<^sup>T $$ (i, i1) = (1::'a) \<and> M\<^sup>T $$ (i, i2) = (1::'a)}
 2. \<lbrakk>j1 < dim_col M; j2 < dim_col M\<rbrakk> \<Longrightarrow> card {i. i < dim_row M \<and> M $$ (i, j1) = (1::'a) \<and> M $$ (i, j2) = (1::'a)} = card {j. j < dim_row M \<and> M\<^sup>T $$ (j1, j) = (1::'a) \<and> M\<^sup>T $$ (j2, j) = (1::'a)}
[PROOF STEP]
apply (metis (no_types, lifting) index_transpose_mat(1))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>j1 < dim_col M; j2 < dim_col M\<rbrakk> \<Longrightarrow> card {i. i < dim_row M \<and> M $$ (i, j1) = (1::'a) \<and> M $$ (i, j2) = (1::'a)} = card {j. j < dim_row M \<and> M\<^sup>T $$ (j1, j) = (1::'a) \<and> M\<^sup>T $$ (j2, j) = (1::'a)}
[PROOF STEP]
by (metis (no_types, lifting) index_transpose_mat(1))


[STATEMENT]
lemma columns_image_basis:
  fixes A :: "real^'n^'m"
  shows "columns A = (*v) A ` (range (\<lambda>i. axis i 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. columns A = (*v) A ` range (\<lambda>i. axis i 1)
[PROOF STEP]
by (force simp: columns_def matrix_vector_mult_basis [symmetric])


[STATEMENT]
lemma subspace_left_null_space:
  fixes A::"'a::{field}^'n^'m"
  shows "vec.subspace (left_null_space A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec.subspace (left_null_space A)
[PROOF STEP]
unfolding left_null_space_eq_null_space_transpose
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec.subspace (null_space (Finite_Cartesian_Product.transpose A))
[PROOF STEP]
using subspace_null_space
[PROOF STATE]
proof (prove)
using this:
vec.subspace (null_space ?A)

goal (1 subgoal):
 1. vec.subspace (null_space (Finite_Cartesian_Product.transpose A))
[PROOF STEP]
.


[STATEMENT]
lemma mdeg_1_singleton:
  assumes "max_deg (Node r xs) = 1"
  shows "\<exists>x. xs = {|x|}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
obtain x where x_def: "x |\<in>| xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x |\<in>| xs \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
max_deg (Node r xs) = 1

goal (1 subgoal):
 1. (\<And>x. x |\<in>| xs \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis all_not_fin_conv empty_iff_mdeg_0 zero_neq_one)
[PROOF STATE]
proof (state)
this:
x |\<in>| xs

goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x |\<in>| xs

goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
have "fcard xs \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fcard xs \<le> 1
[PROOF STEP]
using assms mdeg_ge_fcard
[PROOF STATE]
proof (prove)
using this:
max_deg (Node r xs) = 1
fcard ?xs \<le> max_deg (Node ?r ?xs)

goal (1 subgoal):
 1. fcard xs \<le> 1
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
fcard xs \<le> 1

goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x |\<in>| xs
fcard xs \<le> 1
[PROOF STEP]
have "xs = {|x|}"
[PROOF STATE]
proof (prove)
using this:
x |\<in>| xs
fcard xs \<le> 1

goal (1 subgoal):
 1. xs = {|x|}
[PROOF STEP]
by (metis order_bot_class.bot.not_eq_extremum diff_Suc_1 diff_is_0_eq' fcard_finsert_disjoint
        less_nat_zero_code mk_disjoint_finsert pfsubset_fcard_mono)
[PROOF STATE]
proof (state)
this:
xs = {|x|}

goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs = {|x|}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = {|x|}

goal (1 subgoal):
 1. \<exists>x. xs = {|x|}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>x. xs = {|x|}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma frontier_of_subset_eq:
  assumes "S \<subseteq> topspace X"
  shows "(X frontier_of S) \<subseteq> S \<longleftrightarrow> closedin X S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X frontier_of S \<subseteq> S) = closedin X S
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. X frontier_of S \<subseteq> S \<Longrightarrow> closedin X S
 2. closedin X S \<Longrightarrow> X frontier_of S \<subseteq> S
[PROOF STEP]
show "X frontier_of S \<subseteq> S \<Longrightarrow> closedin X S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X frontier_of S \<subseteq> S \<Longrightarrow> closedin X S
[PROOF STEP]
by (metis assms closure_of_subset_eq interior_of_subset interior_of_union_frontier_of le_sup_iff)
[PROOF STATE]
proof (state)
this:
X frontier_of S \<subseteq> S \<Longrightarrow> closedin X S

goal (1 subgoal):
 1. closedin X S \<Longrightarrow> X frontier_of S \<subseteq> S
[PROOF STEP]
show "closedin X S \<Longrightarrow> X frontier_of S \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closedin X S \<Longrightarrow> X frontier_of S \<subseteq> S
[PROOF STEP]
by (simp add: frontier_of_subset_closedin)
[PROOF STATE]
proof (state)
this:
closedin X S \<Longrightarrow> X frontier_of S \<subseteq> S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma max_density_is_max:
  assumes "finite_graph G" and "finite_graph G'" and "nonempty_graph G'" and "uwellformed G'" and "subgraph G' G"
  shows "density G' \<le> max_density G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<le> max_density G
[PROOF STEP]
unfolding max_density_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<le> Max (Ugraph_Lemmas.density ` nonempty_subgraphs G)
[PROOF STEP]
proof (rule Max_ge)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite (Ugraph_Lemmas.density ` nonempty_subgraphs G)
 2. Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` nonempty_subgraphs G
[PROOF STEP]
show "finite (density ` nonempty_subgraphs G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (Ugraph_Lemmas.density ` nonempty_subgraphs G)
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
finite_graph G

goal (1 subgoal):
 1. finite (Ugraph_Lemmas.density ` nonempty_subgraphs G)
[PROOF STEP]
by (simp add: nonempty_subgraphs_finite)
[PROOF STATE]
proof (state)
this:
finite (Ugraph_Lemmas.density ` nonempty_subgraphs G)

goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` nonempty_subgraphs G
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` nonempty_subgraphs G
[PROOF STEP]
show "density G' \<in> density ` nonempty_subgraphs G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` nonempty_subgraphs G
[PROOF STEP]
unfolding nonempty_subgraphs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` {G'. uwellformed G' \<and> subgraph G' G \<and> nonempty_graph G'}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite_graph G
finite_graph G'
nonempty_graph G'
uwellformed G'
subgraph G' G

goal (1 subgoal):
 1. Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` {G'. uwellformed G' \<and> subgraph G' G \<and> nonempty_graph G'}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Ugraph_Lemmas.density G' \<in> Ugraph_Lemmas.density ` nonempty_subgraphs G

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma connected_convex_1_gen:
  fixes S :: "'a :: euclidean_space set"
  assumes "DIM('a) = 1"
  shows "connected S \<longleftrightarrow> convex S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected S = convex S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connected S = convex S
[PROOF STEP]
obtain f:: "'a \<Rightarrow> real" where linf: "linear f" and "inj f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>f. \<lbrakk>linear f; inj f\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using subspace_isomorphism[OF subspace_UNIV subspace_UNIV,
        where 'a='a and 'b=real]
[PROOF STATE]
proof (prove)
using this:
dim UNIV = dim UNIV \<Longrightarrow> \<exists>f. linear f \<and> surj f \<and> inj f

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>linear f; inj f\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding Euclidean_Space.dim_UNIV
[PROOF STATE]
proof (prove)
using this:
DIM('a) = DIM(real) \<Longrightarrow> \<exists>f. linear f \<and> surj f \<and> inj f

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>linear f; inj f\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: assms)
[PROOF STATE]
proof (state)
this:
linear f
inj f

goal (1 subgoal):
 1. connected S = convex S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
linear f
inj f
[PROOF STEP]
have "f -` (f ` S) = S"
[PROOF STATE]
proof (prove)
using this:
linear f
inj f

goal (1 subgoal):
 1. f -` f ` S = S
[PROOF STEP]
by (simp add: inj_vimage_image_eq)
[PROOF STATE]
proof (state)
this:
f -` f ` S = S

goal (1 subgoal):
 1. connected S = convex S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f -` f ` S = S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f -` f ` S = S

goal (1 subgoal):
 1. connected S = convex S
[PROOF STEP]
by (metis connected_convex_1 convex_linear_vimage linf convex_connected connected_linear_image)
[PROOF STATE]
proof (state)
this:
connected S = convex S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fold_distr: "(\<forall>x y. f (x + y) = f x + f y) \<Longrightarrow> f (fold (+) list e) = fold (+) (map f list) (f e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. f (x + y) = f x + f y \<Longrightarrow> f (fold (+) list e) = fold (+) (map f list) (f e)
[PROOF STEP]
by (induction list arbitrary: e) auto


[STATEMENT]
lemma aff_dim_parallel_eq:
  fixes S T :: "'n::euclidean_space set"
  assumes "affine_parallel (affine hull S) (affine hull T)"
  shows "aff_dim S = aff_dim T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
assume "T \<noteq> {}" "S \<noteq> {}"
[PROOF STATE]
proof (state)
this:
T \<noteq> {}
S \<noteq> {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
T \<noteq> {}
S \<noteq> {}
[PROOF STEP]
obtain L where L: "subspace L \<and> affine_parallel (affine hull T) L"
[PROOF STATE]
proof (prove)
using this:
T \<noteq> {}
S \<noteq> {}

goal (1 subgoal):
 1. (\<And>L. subspace L \<and> affine_parallel (affine hull T) L \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using affine_parallel_subspace[of "affine hull T"]
        affine_affine_hull[of T]
[PROOF STATE]
proof (prove)
using this:
T \<noteq> {}
S \<noteq> {}
\<lbrakk>affine (affine hull T); affine hull T \<noteq> {}\<rbrakk> \<Longrightarrow> \<exists>!L. subspace L \<and> affine_parallel (affine hull T) L
affine (affine hull T)

goal (1 subgoal):
 1. (\<And>L. subspace L \<and> affine_parallel (affine hull T) L \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subspace L \<and> affine_parallel (affine hull T) L

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
subspace L \<and> affine_parallel (affine hull T) L
[PROOF STEP]
have "aff_dim T = int (dim L)"
[PROOF STATE]
proof (prove)
using this:
subspace L \<and> affine_parallel (affine hull T) L

goal (1 subgoal):
 1. aff_dim T = int (dim L)
[PROOF STEP]
using aff_dim_parallel_subspace \<open>T \<noteq> {}\<close>
[PROOF STATE]
proof (prove)
using this:
subspace L \<and> affine_parallel (affine hull T) L
\<lbrakk>?V \<noteq> {}; subspace ?L; affine_parallel (affine hull ?V) ?L\<rbrakk> \<Longrightarrow> aff_dim ?V = int (dim ?L)
T \<noteq> {}

goal (1 subgoal):
 1. aff_dim T = int (dim L)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim T = int (dim L)

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
aff_dim T = int (dim L)

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
have *: "subspace L \<and> affine_parallel (affine hull S) L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subspace L \<and> affine_parallel (affine hull S) L
[PROOF STEP]
using L affine_parallel_assoc[of "affine hull S" "affine hull T" L] assms
[PROOF STATE]
proof (prove)
using this:
subspace L \<and> affine_parallel (affine hull T) L
\<lbrakk>affine_parallel (affine hull S) (affine hull T); affine_parallel (affine hull T) L\<rbrakk> \<Longrightarrow> affine_parallel (affine hull S) L
affine_parallel (affine hull S) (affine hull T)

goal (1 subgoal):
 1. subspace L \<and> affine_parallel (affine hull S) L
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subspace L \<and> affine_parallel (affine hull S) L

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
subspace L \<and> affine_parallel (affine hull S) L

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
subspace L \<and> affine_parallel (affine hull S) L
[PROOF STEP]
have "aff_dim S = int (dim L)"
[PROOF STATE]
proof (prove)
using this:
subspace L \<and> affine_parallel (affine hull S) L

goal (1 subgoal):
 1. aff_dim S = int (dim L)
[PROOF STEP]
using aff_dim_parallel_subspace \<open>S \<noteq> {}\<close>
[PROOF STATE]
proof (prove)
using this:
subspace L \<and> affine_parallel (affine hull S) L
\<lbrakk>?V \<noteq> {}; subspace ?L; affine_parallel (affine hull ?V) ?L\<rbrakk> \<Longrightarrow> aff_dim ?V = int (dim ?L)
S \<noteq> {}

goal (1 subgoal):
 1. aff_dim S = int (dim L)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim S = int (dim L)

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
aff_dim T = int (dim L)
subspace L \<and> affine_parallel (affine hull S) L
aff_dim S = int (dim L)
[PROOF STEP]
have ?thesis
[PROOF STATE]
proof (prove)
using this:
aff_dim T = int (dim L)
subspace L \<and> affine_parallel (affine hull S) L
aff_dim S = int (dim L)

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>T \<noteq> {}; S \<noteq> {}\<rbrakk> \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>T \<noteq> {}; S \<noteq> {}\<rbrakk> \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lbrakk>T \<noteq> {}; S \<noteq> {}\<rbrakk> \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
assume "S = {}"
[PROOF STATE]
proof (state)
this:
S = {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S = {}
[PROOF STEP]
have "S = {}" and "T = {}"
[PROOF STATE]
proof (prove)
using this:
S = {}

goal (1 subgoal):
 1. S = {} &&& T = {}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S = {}
affine_parallel (affine hull S) (affine hull T)

goal (1 subgoal):
 1. S = {} &&& T = {}
[PROOF STEP]
unfolding affine_parallel_def
[PROOF STATE]
proof (prove)
using this:
S = {}
\<exists>a. affine hull T = (+) a ` (affine hull S)

goal (1 subgoal):
 1. S = {} &&& T = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S = {}
T = {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S = {}
T = {}
[PROOF STEP]
have ?thesis
[PROOF STATE]
proof (prove)
using this:
S = {}
T = {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
using aff_dim_empty
[PROOF STATE]
proof (prove)
using this:
S = {}
T = {}
(?S = {}) = (aff_dim ?S = - 1)

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
S = {} \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
S = {} \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
S = {} \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
assume "T = {}"
[PROOF STATE]
proof (state)
this:
T = {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
T = {}
[PROOF STEP]
have "S = {}" and "T = {}"
[PROOF STATE]
proof (prove)
using this:
T = {}

goal (1 subgoal):
 1. S = {} &&& T = {}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
T = {}
affine_parallel (affine hull S) (affine hull T)

goal (1 subgoal):
 1. S = {} &&& T = {}
[PROOF STEP]
unfolding affine_parallel_def
[PROOF STATE]
proof (prove)
using this:
T = {}
\<exists>a. affine hull T = (+) a ` (affine hull S)

goal (1 subgoal):
 1. S = {} &&& T = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S = {}
T = {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S = {}
T = {}
[PROOF STEP]
have ?thesis
[PROOF STATE]
proof (prove)
using this:
S = {}
T = {}

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
using aff_dim_empty
[PROOF STATE]
proof (prove)
using this:
S = {}
T = {}
(?S = {}) = (aff_dim ?S = - 1)

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
T = {} \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>T \<noteq> {}; S \<noteq> {}\<rbrakk> \<Longrightarrow> aff_dim S = aff_dim T
S = {} \<Longrightarrow> aff_dim S = aff_dim T
T = {} \<Longrightarrow> aff_dim S = aff_dim T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>T \<noteq> {}; S \<noteq> {}\<rbrakk> \<Longrightarrow> aff_dim S = aff_dim T
S = {} \<Longrightarrow> aff_dim S = aff_dim T
T = {} \<Longrightarrow> aff_dim S = aff_dim T

goal (1 subgoal):
 1. aff_dim S = aff_dim T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
aff_dim S = aff_dim T

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma multiplicity_decompose:
  "\<not>p dvd (x div p ^ multiplicity p x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> p dvd x div p ^ multiplicity p x
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
assume *: "p dvd x div p ^ multiplicity p x"
[PROOF STATE]
proof (state)
this:
p dvd x div p ^ multiplicity p x

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
have "x = x div p ^ multiplicity p x * (p ^ multiplicity p x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = x div p ^ multiplicity p x * p ^ multiplicity p x
[PROOF STEP]
using multiplicity_dvd[of p x]
[PROOF STATE]
proof (prove)
using this:
p ^ multiplicity p x dvd x

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

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x = x div p ^ multiplicity p x * p ^ multiplicity p x

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
p dvd x div p ^ multiplicity p x
[PROOF STEP]
have "x div p ^ multiplicity p x = (x div p ^ multiplicity p x div p) * p"
[PROOF STATE]
proof (prove)
using this:
p dvd x div p ^ multiplicity p x

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

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x div p ^ multiplicity p x = x div p ^ multiplicity p x div p * p

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
have "x div p ^ multiplicity p x div p * p * p ^ multiplicity p x =
               x div p ^ multiplicity p x div p * p ^ Suc (multiplicity p x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x div p ^ multiplicity p x div p * p * p ^ multiplicity p x = x div p ^ multiplicity p x div p * p ^ Suc (multiplicity p x)
[PROOF STEP]
by (simp add: mult_assoc)
[PROOF STATE]
proof (state)
this:
x div p ^ multiplicity p x div p * p * p ^ multiplicity p x = x div p ^ multiplicity p x div p * p ^ Suc (multiplicity p x)

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x div p ^ multiplicity p x div p * p * p ^ multiplicity p x = x div p ^ multiplicity p x div p * p ^ Suc (multiplicity p x)

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
have "p ^ Suc (multiplicity p x) dvd \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p ^ Suc (multiplicity p x) dvd x div p ^ multiplicity p x div p * p ^ Suc (multiplicity p x)
[PROOF STEP]
by (rule dvd_triv_right)
[PROOF STATE]
proof (state)
this:
p ^ Suc (multiplicity p x) dvd x div p ^ multiplicity p x div p * p ^ Suc (multiplicity p x)

goal (1 subgoal):
 1. p dvd x div p ^ multiplicity p x \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
p ^ Suc (multiplicity p x) dvd x
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
p ^ Suc (multiplicity p x) dvd x

goal (1 subgoal):
 1. False
[PROOF STEP]
by (subst (asm) power_dvd_iff_le_multiplicity) simp
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem weak_conv_imp_continuity_set_conv:
  fixes f :: "real \<Rightarrow> real"
  assumes [measurable]: "A \<in> sets borel" and "M (frontier A) = 0"
  shows "(\<lambda>n. measure (\<mu> n) A) \<longlonglongrightarrow> measure M A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. Sigma_Algebra.measure (\<mu> n) A) \<longlonglongrightarrow> Sigma_Algebra.measure M A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. Sigma_Algebra.measure (\<mu> n) A) \<longlonglongrightarrow> Sigma_Algebra.measure M A
[PROOF STEP]
interpret M: real_distribution M
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_distribution M
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. Sigma_Algebra.measure (\<mu> n) A) \<longlonglongrightarrow> M.prob A
[PROOF STEP]
interpret \<mu>: real_distribution "\<mu> n" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_distribution (\<mu> n)
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. \<mu>.prob n A) \<longlonglongrightarrow> M.prob A
[PROOF STEP]
have "(\<lambda>n. (\<integral>x. indicator A x \<partial>\<mu> n) :: real) \<longlonglongrightarrow> (\<integral>x. indicator A x \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. \<mu>.expectation n (indicat_real A)) \<longlonglongrightarrow> M.expectation (indicat_real A)
[PROOF STEP]
by (intro weak_conv_imp_bdd_ae_continuous_conv[where B=1])
       (auto intro: assms simp: isCont_indicator)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<mu>.expectation n (indicat_real A)) \<longlonglongrightarrow> M.expectation (indicat_real A)

goal (1 subgoal):
 1. (\<lambda>n. \<mu>.prob n A) \<longlonglongrightarrow> M.prob A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. \<mu>.expectation n (indicat_real A)) \<longlonglongrightarrow> M.expectation (indicat_real A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. \<mu>.expectation n (indicat_real A)) \<longlonglongrightarrow> M.expectation (indicat_real A)

goal (1 subgoal):
 1. (\<lambda>n. \<mu>.prob n A) \<longlonglongrightarrow> M.prob A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<mu>.prob n A) \<longlonglongrightarrow> M.prob A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pnorm_deriv_eq_iff_pderiv_eq:
  "pnorm (deriv a r) = pnorm (deriv a s) \<longleftrightarrow> pderiv a r = pderiv a s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (pnorm (deriv a r) = pnorm (deriv a s)) = (pderiv a r = pderiv a s)
[PROOF STEP]
unfolding pnorm_def o_apply pset_deriv
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (flatten PLUS (pderiv a r) = flatten PLUS (pderiv a s)) = (pderiv a r = pderiv a s)
[PROOF STEP]
by (rule flatten_PLUS_inject) auto


[STATEMENT]
lemma oppositeLiteralListRemove:
  fixes literal :: Literal and literalList :: "Literal list"
  shows "oppositeLiteralList (removeAll literal literalList) = removeAll (opposite literal) (oppositeLiteralList literalList)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oppositeLiteralList (removeAll literal literalList) = removeAll (opposite literal) (oppositeLiteralList literalList)
[PROOF STEP]
unfolding oppositeLiteralList_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map opposite (removeAll literal literalList) = removeAll (opposite literal) (map opposite literalList)
[PROOF STEP]
by (induct literalList) auto


[STATEMENT]
theorem mod_is_pr: "(\<lambda> a b. a mod b) \<in> PrimRec2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (mod) \<in> PrimRec2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (mod) \<in> PrimRec2
[PROOF STEP]
have "(\<lambda> (a::nat) (b::nat). a mod b) = (\<lambda> a b. a - (a div b) * b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (mod) = (\<lambda>a b. a - a div b * b)
[PROOF STEP]
proof (rule ext, rule ext)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. a mod b = a - a div b * b
[PROOF STEP]
fix a b
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. a mod b = a - a div b * b
[PROOF STEP]
show "(a::nat) mod b = a - (a div b) * b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod b = a - a div b * b
[PROOF STEP]
by (rule minus_div_mult_eq_mod [symmetric])
[PROOF STATE]
proof (state)
this:
a mod b = a - a div b * b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(mod) = (\<lambda>a b. a - a div b * b)

goal (1 subgoal):
 1. (mod) \<in> PrimRec2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(mod) = (\<lambda>a b. a - a div b * b)

goal (1 subgoal):
 1. (mod) \<in> PrimRec2
[PROOF STEP]
from div_is_pr
[PROOF STATE]
proof (chain)
picking this:
(div) \<in> PrimRec2
[PROOF STEP]
have "(\<lambda> a b. a - (a div b) * b) \<in> PrimRec2"
[PROOF STATE]
proof (prove)
using this:
(div) \<in> PrimRec2

goal (1 subgoal):
 1. (\<lambda>a b. a - a div b * b) \<in> PrimRec2
[PROOF STEP]
by prec
[PROOF STATE]
proof (state)
this:
(\<lambda>a b. a - a div b * b) \<in> PrimRec2

goal (1 subgoal):
 1. (mod) \<in> PrimRec2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(mod) = (\<lambda>a b. a - a div b * b)
(\<lambda>a b. a - a div b * b) \<in> PrimRec2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(mod) = (\<lambda>a b. a - a div b * b)
(\<lambda>a b. a - a div b * b) \<in> PrimRec2

goal (1 subgoal):
 1. (mod) \<in> PrimRec2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(mod) \<in> PrimRec2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma max_iMin_eq_iMin_max: "
  \<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow>
  max x (iMin A) = iMin {max x a |a. a \<in> A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> max x (iMin A) = iMin {max x a |a. a \<in> A}
[PROOF STEP]
apply (simp add: iMin_Min_conv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> max x (Min A) = Min {max x a |a. a \<in> A}
[PROOF STEP]
apply (insert iMin_Min_conv[of "{max x a |a. a \<in> A}"], simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; A \<noteq> {}; iMin {max x a |a. a \<in> A} = Min {max x a |a. a \<in> A}\<rbrakk> \<Longrightarrow> max x (Min A) = Min {max x a |a. a \<in> A}
[PROOF STEP]
apply (subgoal_tac "finite {max x a |a. a \<in> A}")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>finite A; A \<noteq> {}; iMin {max x a |a. a \<in> A} = Min {max x a |a. a \<in> A}; finite {max x a |a. a \<in> A}\<rbrakk> \<Longrightarrow> max x (Min A) = Min {max x a |a. a \<in> A}
 2. \<lbrakk>finite A; A \<noteq> {}; iMin {max x a |a. a \<in> A} = Min {max x a |a. a \<in> A}\<rbrakk> \<Longrightarrow> finite {max x a |a. a \<in> A}
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>finite A; A \<noteq> {}; iMin {max x a |a. a \<in> A} = Min {max x a |a. a \<in> A}\<rbrakk> \<Longrightarrow> finite {max x a |a. a \<in> A}
 2. \<lbrakk>finite A; A \<noteq> {}; iMin {max x a |a. a \<in> A} = Min {max x a |a. a \<in> A}; finite {max x a |a. a \<in> A}\<rbrakk> \<Longrightarrow> max x (Min A) = Min {max x a |a. a \<in> A}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; A \<noteq> {}; iMin {max x a |a. a \<in> A} = Min {max x a |a. a \<in> A}; finite {max x a |a. a \<in> A}\<rbrakk> \<Longrightarrow> max x (Min A) = Min {max x a |a. a \<in> A}
[PROOF STEP]
apply (simp add: max_Min_eq_Min_max)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma block_complement_inter_empty: "bl1\<^sup>c = bl2 \<Longrightarrow> bl1 \<inter> bl2 = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bl1\<^sup>c = bl2 \<Longrightarrow> bl1 \<inter> bl2 = {}
[PROOF STEP]
using block_complement_def
[PROOF STATE]
proof (prove)
using this:
?b\<^sup>c \<equiv> \<V> - ?b

goal (1 subgoal):
 1. bl1\<^sup>c = bl2 \<Longrightarrow> bl1 \<inter> bl2 = {}
[PROOF STEP]
by auto


[STATEMENT]
lemma cong_diff_iff_cong_0:
  "[b - c = 0] (mod a) \<longleftrightarrow> [b = c] (mod a)" (is "?P \<longleftrightarrow> ?Q")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [b - c = 0::'a] (mod a) = [b = c] (mod a)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. [b - c = 0::'a] (mod a) \<Longrightarrow> [b = c] (mod a)
 2. [b = c] (mod a) \<Longrightarrow> [b - c = 0::'a] (mod a)
[PROOF STEP]
assume ?P
[PROOF STATE]
proof (state)
this:
[b - c = 0::'a] (mod a)

goal (2 subgoals):
 1. [b - c = 0::'a] (mod a) \<Longrightarrow> [b = c] (mod a)
 2. [b = c] (mod a) \<Longrightarrow> [b - c = 0::'a] (mod a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[b - c = 0::'a] (mod a)
[PROOF STEP]
have "[b - c + c = 0 + c] (mod a)"
[PROOF STATE]
proof (prove)
using this:
[b - c = 0::'a] (mod a)

goal (1 subgoal):
 1. [b - c + c = (0::'a) + c] (mod a)
[PROOF STEP]
by (rule cong_add) simp
[PROOF STATE]
proof (state)
this:
[b - c + c = (0::'a) + c] (mod a)

goal (2 subgoals):
 1. [b - c = 0::'a] (mod a) \<Longrightarrow> [b = c] (mod a)
 2. [b = c] (mod a) \<Longrightarrow> [b - c = 0::'a] (mod a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[b - c + c = (0::'a) + c] (mod a)
[PROOF STEP]
show ?Q
[PROOF STATE]
proof (prove)
using this:
[b - c + c = (0::'a) + c] (mod a)

goal (1 subgoal):
 1. [b = c] (mod a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[b = c] (mod a)

goal (1 subgoal):
 1. [b = c] (mod a) \<Longrightarrow> [b - c = 0::'a] (mod a)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [b = c] (mod a) \<Longrightarrow> [b - c = 0::'a] (mod a)
[PROOF STEP]
assume ?Q
[PROOF STATE]
proof (state)
this:
[b = c] (mod a)

goal (1 subgoal):
 1. [b = c] (mod a) \<Longrightarrow> [b - c = 0::'a] (mod a)
[PROOF STEP]
with cong_diff [of b c a c c]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>[b = c] (mod a); [c = c] (mod a)\<rbrakk> \<Longrightarrow> [b - c = c - c] (mod a)
[b = c] (mod a)
[PROOF STEP]
show ?P
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>[b = c] (mod a); [c = c] (mod a)\<rbrakk> \<Longrightarrow> [b - c = c - c] (mod a)
[b = c] (mod a)

goal (1 subgoal):
 1. [b - c = 0::'a] (mod a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[b - c = 0::'a] (mod a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma discounted_AE_cong:
  assumes "AE w in N. X n w = Y n w"
  shows "AE w in N. discounted_value r X n w = discounted_value r Y n w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AEeq N (discounted_value r X n) (discounted_value r Y n)
[PROOF STEP]
proof (rule AE_mp)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. almost_everywhere N ?P
 2. AE w in N. ?P w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
show "AE w in N. X n w = Y n w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AEeq N (X n) (Y n)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
AEeq N (X n) (Y n)

goal (1 subgoal):
 1. AEeq N (X n) (Y n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
AEeq N (X n) (Y n)

goal (1 subgoal):
 1. AE w in N. X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
show "AE w in N. X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE w in N. X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>w. w \<in> space N \<Longrightarrow> X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
fix w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>w. w \<in> space N \<Longrightarrow> X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
assume "w\<in> space N"
[PROOF STATE]
proof (state)
this:
w \<in> space N

goal (1 subgoal):
 1. \<And>w. w \<in> space N \<Longrightarrow> X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
thus "X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w "
[PROOF STATE]
proof (prove)
using this:
w \<in> space N

goal (1 subgoal):
 1. X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w
[PROOF STEP]
by (simp add:discounted_value_def)
[PROOF STATE]
proof (state)
this:
X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
AE w in N. X n w = Y n w \<longrightarrow> discounted_value r X n w = discounted_value r Y n w

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma from_nat_neq_cols:
  fixes A::"'a^'cols::mod_type^'rows::mod_type"
  assumes i: "i<(ncols A)" and k: "k<(ncols A)" and ik: "i \<noteq> k"
  shows "from_nat i \<noteq> (from_nat k::'cols)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. from_nat i \<noteq> from_nat k
[PROOF STEP]
proof (rule ccontr, auto)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. from_nat i = from_nat k \<Longrightarrow> False
[PROOF STEP]
let ?i="from_nat i::'cols"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. from_nat i = from_nat k \<Longrightarrow> False
[PROOF STEP]
let ?k="from_nat k::'cols"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. from_nat i = from_nat k \<Longrightarrow> False
[PROOF STEP]
assume "?i = ?k"
[PROOF STATE]
proof (state)
this:
from_nat i = from_nat k

goal (1 subgoal):
 1. from_nat i = from_nat k \<Longrightarrow> False
[PROOF STEP]
hence "to_nat ?i = to_nat ?k"
[PROOF STATE]
proof (prove)
using this:
from_nat i = from_nat k

goal (1 subgoal):
 1. to_nat (from_nat i) = to_nat (from_nat k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
to_nat (from_nat i) = to_nat (from_nat k)

goal (1 subgoal):
 1. from_nat i = from_nat k \<Longrightarrow> False
[PROOF STEP]
hence "i = k"
[PROOF STATE]
proof (prove)
using this:
to_nat (from_nat i) = to_nat (from_nat k)

goal (1 subgoal):
 1. i = k
[PROOF STEP]
unfolding to_nat_from_nat_id[OF i[unfolded ncols_def]]
[PROOF STATE]
proof (prove)
using this:
i = to_nat (from_nat k)

goal (1 subgoal):
 1. i = k
[PROOF STEP]
unfolding to_nat_from_nat_id[OF k[unfolded ncols_def]]
[PROOF STATE]
proof (prove)
using this:
i = k

goal (1 subgoal):
 1. i = k
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
i = k

goal (1 subgoal):
 1. from_nat i = from_nat k \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
i = k

goal (1 subgoal):
 1. False
[PROOF STEP]
using ik
[PROOF STATE]
proof (prove)
using this:
i = k
i \<noteq> k

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subset_stabilizer_Un:
  shows "stabilizer A \<inter> stabilizer B \<subseteq> stabilizer (A \<union> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stabilizer A \<inter> stabilizer B \<subseteq> stabilizer (A \<union> B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
assume hx: "x \<in> stabilizer A \<inter> stabilizer B"
[PROOF STATE]
proof (state)
this:
x \<in> stabilizer A \<inter> stabilizer B

goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> stabilizer A \<inter> stabilizer B
[PROOF STEP]
have "sumset {x} (A \<inter> G) = A \<inter> G"
[PROOF STATE]
proof (prove)
using this:
x \<in> stabilizer A \<inter> stabilizer B

goal (1 subgoal):
 1. sumset {x} (A \<inter> G) = A \<inter> G
[PROOF STEP]
using stabilizer_def
[PROOF STATE]
proof (prove)
using this:
x \<in> stabilizer A \<inter> stabilizer B
stabilizer ?S \<equiv> {x \<in> G. sumset {x} (?S \<inter> G) = ?S \<inter> G}

goal (1 subgoal):
 1. sumset {x} (A \<inter> G) = A \<inter> G
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sumset {x} (A \<inter> G) = A \<inter> G

goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sumset {x} (A \<inter> G) = A \<inter> G

goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
have "sumset {x} (B \<inter> G) = (B \<inter> G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sumset {x} (B \<inter> G) = B \<inter> G
[PROOF STEP]
using stabilizer_def hx
[PROOF STATE]
proof (prove)
using this:
stabilizer ?S \<equiv> {x \<in> G. sumset {x} (?S \<inter> G) = ?S \<inter> G}
x \<in> stabilizer A \<inter> stabilizer B

goal (1 subgoal):
 1. sumset {x} (B \<inter> G) = B \<inter> G
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sumset {x} (B \<inter> G) = B \<inter> G

goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sumset {x} (A \<inter> G) = A \<inter> G
sumset {x} (B \<inter> G) = B \<inter> G
[PROOF STEP]
have "sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G"
[PROOF STATE]
proof (prove)
using this:
sumset {x} (A \<inter> G) = A \<inter> G
sumset {x} (B \<inter> G) = B \<inter> G

goal (1 subgoal):
 1. sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G
[PROOF STEP]
using sumset_subset_Un2
    boolean_algebra.conj_disj_distrib2
[PROOF STATE]
proof (prove)
using this:
sumset {x} (A \<inter> G) = A \<inter> G
sumset {x} (B \<inter> G) = B \<inter> G
sumset ?A (?B \<union> ?B') = sumset ?A ?B \<union> sumset ?A ?B'
inf (sup ?y ?z) ?x = sup (inf ?y ?x) (inf ?z ?x)

goal (1 subgoal):
 1. sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G

goal (1 subgoal):
 1. \<And>x. x \<in> stabilizer A \<inter> stabilizer B \<Longrightarrow> x \<in> stabilizer (A \<union> B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G
[PROOF STEP]
show "x \<in> stabilizer (A \<union> B)"
[PROOF STATE]
proof (prove)
using this:
sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G

goal (1 subgoal):
 1. x \<in> stabilizer (A \<union> B)
[PROOF STEP]
using hx stabilizer_subset_group stabilizer_def
[PROOF STATE]
proof (prove)
using this:
sumset {x} ((A \<union> B) \<inter> G) = (A \<union> B) \<inter> G
x \<in> stabilizer A \<inter> stabilizer B
stabilizer ?S \<subseteq> G
stabilizer ?S \<equiv> {x \<in> G. sumset {x} (?S \<inter> G) = ?S \<inter> G}

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in weak_partial_order) lless_trans [trans]:
  assumes "a \<sqsubset> b" "b \<sqsubset> c"
    and carr[simp]: "a \<in> carrier L" "b \<in> carrier L" "c \<in> carrier L"
  shows "a \<sqsubset> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<sqsubset> c
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<sqsubset> b
b \<sqsubset> c
a \<in> carrier L
b \<in> carrier L
c \<in> carrier L

goal (1 subgoal):
 1. a \<sqsubset> c
[PROOF STEP]
unfolding lless_def
[PROOF STATE]
proof (prove)
using this:
a \<sqsubseteq> b \<and> a .\<noteq> b
b \<sqsubseteq> c \<and> b .\<noteq> c
a \<in> carrier L
b \<in> carrier L
c \<in> carrier L

goal (1 subgoal):
 1. a \<sqsubseteq> c \<and> a .\<noteq> c
[PROOF STEP]
by (blast dest: le_trans intro: sym)


[STATEMENT]
lemma partition_on_mset_add_single:
  assumes "partition_on_mset A P"
  shows "partition_on_mset (add_mset a A) (add_mset {#a#} P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. partition_on_mset (add_mset a A) (add_mset {#a#} P)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
partition_on_mset A P

goal (1 subgoal):
 1. partition_on_mset (add_mset a A) (add_mset {#a#} P)
[PROOF STEP]
by (auto simp: partition_on_mset_def)


[STATEMENT]
theorem confluence:
  assumes "A \<rightarrow>\<beta>\<^sup>* B" "A \<rightarrow>\<beta>\<^sup>* C"
  shows "\<exists>D. (B \<rightarrow>\<beta>\<^sup>* D) \<and> (C \<rightarrow>\<beta>\<^sup>* D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
A \<rightarrow>\<beta>\<^sup>* B
A \<rightarrow>\<beta>\<^sup>* C
[PROOF STEP]
have "A >>\<^sup>* B" "A >>\<^sup>* C"
[PROOF STATE]
proof (prove)
using this:
A \<rightarrow>\<beta>\<^sup>* B
A \<rightarrow>\<beta>\<^sup>* C

goal (1 subgoal):
 1. A >>\<^sup>* B &&& A >>\<^sup>* C
[PROOF STEP]
using parallel_beta_reduces_equivalent
[PROOF STATE]
proof (prove)
using this:
A \<rightarrow>\<beta>\<^sup>* B
A \<rightarrow>\<beta>\<^sup>* C
?A >>\<^sup>* ?B = ?A \<rightarrow>\<beta>\<^sup>* ?B

goal (1 subgoal):
 1. A >>\<^sup>* B &&& A >>\<^sup>* C
[PROOF STEP]
by metis+
[PROOF STATE]
proof (state)
this:
A >>\<^sup>* B
A >>\<^sup>* C

goal (1 subgoal):
 1. \<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D
[PROOF STEP]
hence "\<exists>D. (B >>\<^sup>* D) \<and> (C >>\<^sup>* D)"
[PROOF STATE]
proof (prove)
using this:
A >>\<^sup>* B
A >>\<^sup>* C

goal (1 subgoal):
 1. \<exists>D. B >>\<^sup>* D \<and> C >>\<^sup>* D
[PROOF STEP]
using parallel_reduces_diamond
[PROOF STATE]
proof (prove)
using this:
A >>\<^sup>* B
A >>\<^sup>* C
\<lbrakk>?A >>\<^sup>* ?B; ?A >>\<^sup>* ?C\<rbrakk> \<Longrightarrow> \<exists>D. ?B >>\<^sup>* D \<and> ?C >>\<^sup>* D

goal (1 subgoal):
 1. \<exists>D. B >>\<^sup>* D \<and> C >>\<^sup>* D
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<exists>D. B >>\<^sup>* D \<and> C >>\<^sup>* D

goal (1 subgoal):
 1. \<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D
[PROOF STEP]
thus "\<exists>D. (B \<rightarrow>\<beta>\<^sup>* D) \<and> (C \<rightarrow>\<beta>\<^sup>* D)"
[PROOF STATE]
proof (prove)
using this:
\<exists>D. B >>\<^sup>* D \<and> C >>\<^sup>* D

goal (1 subgoal):
 1. \<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D
[PROOF STEP]
using parallel_beta_reduces_equivalent
[PROOF STATE]
proof (prove)
using this:
\<exists>D. B >>\<^sup>* D \<and> C >>\<^sup>* D
?A >>\<^sup>* ?B = ?A \<rightarrow>\<beta>\<^sup>* ?B

goal (1 subgoal):
 1. \<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<exists>D. B \<rightarrow>\<beta>\<^sup>* D \<and> C \<rightarrow>\<beta>\<^sup>* D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_integral_deriv:
  fixes a :: "'a::{division_ring,ring_char_0} fps"
  shows "fps_integral (fps_deriv a) (a$0) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_integral (fps_deriv a) (a $ 0) = a
[PROOF STEP]
using fps_integral_conv_plus_const[of "fps_deriv a" "a$0"]
[PROOF STATE]
proof (prove)
using this:
fps_integral (fps_deriv a) (a $ 0) = fps_integral0 (fps_deriv a) + fps_const (a $ 0)

goal (1 subgoal):
 1. fps_integral (fps_deriv a) (a $ 0) = a
[PROOF STEP]
by    (simp add: fps_integral0_deriv)


[STATEMENT]
lemma twopow_le_central_binomial: "2 ^ n \<le> ((2 * n) choose n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ n \<le> 2 * n choose n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 ^ n \<le> 2 * n choose n
[PROOF STEP]
have "2 ^ n * fact n ^ 2 \<le> (fact (2 * n) :: nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n)
[PROOF STEP]
proof (induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n)

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
have "(fact (2 * Suc n) :: nat) = (2 * n + 1) * (2 * n + 2) * fact (2 * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact (2 * Suc n) = (2 * n + 1) * (2 * n + 2) * fact (2 * n)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
fact (2 * Suc n) = (2 * n + 1) * (2 * n + 2) * fact (2 * n)

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
have "2 ^ Suc n * fact (Suc n) ^ 2 = 2 ^ n * fact n ^ 2 * 2 * (n + 1) ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ Suc n * (fact (Suc n))\<^sup>2 = 2 ^ n * (fact n)\<^sup>2 * 2 * (n + 1)\<^sup>2
[PROOF STEP]
by (simp add: algebra_simps power2_eq_square)
[PROOF STATE]
proof (state)
this:
2 ^ Suc n * (fact (Suc n))\<^sup>2 = 2 ^ n * (fact n)\<^sup>2 * 2 * (n + 1)\<^sup>2

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 ^ Suc n * (fact (Suc n))\<^sup>2 = 2 ^ n * (fact n)\<^sup>2 * 2 * (n + 1)\<^sup>2

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
have "\<dots> \<le> fact (2 * n) * 2 * (n + 1) ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ n * (fact n)\<^sup>2 * 2 * (n + 1)\<^sup>2 \<le> fact (2 * n) * 2 * (n + 1)\<^sup>2
[PROOF STEP]
by (intro mult_right_mono Suc.IH) auto
[PROOF STATE]
proof (state)
this:
2 ^ n * (fact n)\<^sup>2 * 2 * (n + 1)\<^sup>2 \<le> fact (2 * n) * 2 * (n + 1)\<^sup>2

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 ^ n * (fact n)\<^sup>2 * 2 * (n + 1)\<^sup>2 \<le> fact (2 * n) * 2 * (n + 1)\<^sup>2

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
have "\<dots> = fact (2 * n) * (2 * (n + 1) ^ 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact (2 * n) * 2 * (n + 1)\<^sup>2 = fact (2 * n) * (2 * (n + 1)\<^sup>2)
[PROOF STEP]
by (simp add: mult_ac)
[PROOF STATE]
proof (state)
this:
fact (2 * n) * 2 * (n + 1)\<^sup>2 = fact (2 * n) * (2 * (n + 1)\<^sup>2)

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fact (2 * n) * 2 * (n + 1)\<^sup>2 = fact (2 * n) * (2 * (n + 1)\<^sup>2)

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
have "\<dots> \<le> fact (2 * n) * ((2 * n + 1) * (2 * n + 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact (2 * n) * (2 * (n + 1)\<^sup>2) \<le> fact (2 * n) * ((2 * n + 1) * (2 * n + 2))
[PROOF STEP]
by (intro mult_left_mono) (auto simp: power2_eq_square)
[PROOF STATE]
proof (state)
this:
fact (2 * n) * (2 * (n + 1)\<^sup>2) \<le> fact (2 * n) * ((2 * n + 1) * (2 * n + 2))

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fact (2 * n) * (2 * (n + 1)\<^sup>2) \<le> fact (2 * n) * ((2 * n + 1) * (2 * n + 2))

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
have "\<dots> = fact (2 * Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact (2 * n) * ((2 * n + 1) * (2 * n + 2)) = fact (2 * Suc n)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
fact (2 * n) * ((2 * n + 1) * (2 * n + 2)) = fact (2 * Suc n)

goal (2 subgoals):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
 2. \<And>n. 2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n) \<Longrightarrow> 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)

goal (1 subgoal):
 1. 2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
2 ^ Suc n * (fact (Suc n))\<^sup>2 \<le> fact (2 * Suc n)

goal (1 subgoal):
 1. 2 ^ 0 * (fact 0)\<^sup>2 \<le> fact (2 * 0)
[PROOF STEP]
qed simp_all
[PROOF STATE]
proof (state)
this:
2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n)

goal (1 subgoal):
 1. 2 ^ n \<le> 2 * n choose n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 ^ n * (fact n)\<^sup>2 \<le> fact (2 * n)

goal (1 subgoal):
 1. 2 ^ n \<le> 2 * n choose n
[PROOF STEP]
have "\<dots> = (2 * n choose n) * fact n ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact (2 * n) = (2 * n choose n) * (fact n)\<^sup>2
[PROOF STEP]
using binomial_fact_lemma[of n "2 * n"]
[PROOF STATE]
proof (prove)
using this:
n \<le> 2 * n \<Longrightarrow> fact n * fact (2 * n - n) * (2 * n choose n) = fact (2 * n)

goal (1 subgoal):
 1. fact (2 * n) = (2 * n choose n) * (fact n)\<^sup>2
[PROOF STEP]
by (simp add: power2_eq_square mult_ac)
[PROOF STATE]
proof (state)
this:
fact (2 * n) = (2 * n choose n) * (fact n)\<^sup>2

goal (1 subgoal):
 1. 2 ^ n \<le> 2 * n choose n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 ^ n * (fact n)\<^sup>2 \<le> (2 * n choose n) * (fact n)\<^sup>2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
2 ^ n * (fact n)\<^sup>2 \<le> (2 * n choose n) * (fact n)\<^sup>2

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma quarter_discrim_self_zero:
  assumes "proj2_abs a = proj2_abs b"
  shows "quarter_discrim a b = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. quarter_discrim a b = 0
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> quarter_discrim a b = 0
 2. \<not> ?P \<Longrightarrow> quarter_discrim a b = 0
[PROOF STEP]
assume "b = 0"
[PROOF STATE]
proof (state)
this:
b = 0

goal (2 subgoals):
 1. ?P \<Longrightarrow> quarter_discrim a b = 0
 2. \<not> ?P \<Longrightarrow> quarter_discrim a b = 0
[PROOF STEP]
thus "quarter_discrim a b = 0"
[PROOF STATE]
proof (prove)
using this:
b = 0

goal (1 subgoal):
 1. quarter_discrim a b = 0
[PROOF STEP]
by (unfold quarter_discrim_def, simp)
[PROOF STATE]
proof (state)
this:
quarter_discrim a b = 0

goal (1 subgoal):
 1. b \<noteq> 0 \<Longrightarrow> quarter_discrim a b = 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. b \<noteq> 0 \<Longrightarrow> quarter_discrim a b = 0
[PROOF STEP]
assume "b \<noteq> 0"
[PROOF STATE]
proof (state)
this:
b \<noteq> 0

goal (1 subgoal):
 1. b \<noteq> 0 \<Longrightarrow> quarter_discrim a b = 0
[PROOF STEP]
with \<open>proj2_abs a = proj2_abs b\<close> and proj2_abs_abs_mult
[PROOF STATE]
proof (chain)
picking this:
proj2_abs a = proj2_abs b
\<lbrakk>proj2_abs ?v = proj2_abs ?w; ?w \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>c. ?v = c *\<^sub>R ?w
b \<noteq> 0
[PROOF STEP]
obtain k where "a = k *\<^sub>R b"
[PROOF STATE]
proof (prove)
using this:
proj2_abs a = proj2_abs b
\<lbrakk>proj2_abs ?v = proj2_abs ?w; ?w \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>c. ?v = c *\<^sub>R ?w
b \<noteq> 0

goal (1 subgoal):
 1. (\<And>k. a = k *\<^sub>R b \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a = k *\<^sub>R b

goal (1 subgoal):
 1. b \<noteq> 0 \<Longrightarrow> quarter_discrim a b = 0
[PROOF STEP]
thus "quarter_discrim a b = 0"
[PROOF STATE]
proof (prove)
using this:
a = k *\<^sub>R b

goal (1 subgoal):
 1. quarter_discrim a b = 0
[PROOF STEP]
unfolding quarter_discrim_def
[PROOF STATE]
proof (prove)
using this:
a = k *\<^sub>R b

goal (1 subgoal):
 1. (a \<bullet> (M *v b))\<^sup>2 - a \<bullet> (M *v a) * (b \<bullet> (M *v b)) = 0
[PROOF STEP]
by (simp add: power2_eq_square
      matrix_scaleR_vector_ac
      scaleR_matrix_vector_assoc [symmetric])
[PROOF STATE]
proof (state)
this:
quarter_discrim a b = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sf_posI: "x > 0 \<Longrightarrow> sf(x) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> 0 < sf x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> 0 < sf x
[PROOF STEP]
assume A1: "x > 0"
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. 0 < x \<Longrightarrow> 0 < sf x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < x
[PROOF STEP]
have "sf(0) < sf(x)"
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. sf 0 < sf x
[PROOF STEP]
by (rule sf_strict_mono)
[PROOF STATE]
proof (state)
this:
sf 0 < sf x

goal (1 subgoal):
 1. 0 < x \<Longrightarrow> 0 < sf x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sf 0 < sf x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sf 0 < sf x

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vreal_inverses_law_addition:
  assumes "x \<in>\<^sub>\<circ> \<real>\<^sub>\<circ>"
  shows "x +\<^sub>\<real> (-\<^sub>\<real> x) = 0\<^sub>\<real>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>
[PROOF STEP]
have "x' + (-x') = 0" for x' :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x' + - x' = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?x' + - ?x' = 0

goal (1 subgoal):
 1. x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>
[PROOF STEP]
from this[untransferred, OF assms]
[PROOF STATE]
proof (chain)
picking this:
x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>

goal (1 subgoal):
 1. x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
x +\<^sub>\<real> -\<^sub>\<real> x = 0\<^sub>\<real>

goal:
No subgoals!
[PROOF STEP]
qed