[STATEMENT]
lemma Gromov_extension_onto:
  fixes f::"'a::Gromov_hyperbolic_space_geodesic \<Rightarrow> 'b::Gromov_hyperbolic_space_geodesic"
  assumes "lambda C-quasi_isometry_between UNIV UNIV f"
          "y \<in> Gromov_boundary"
  shows "\<exists>x \<in> Gromov_boundary. Gromov_extension f x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
define u where "u = rep_Gromov_completion y"
[PROOF STATE]
proof (state)
this:
u = rep_Gromov_completion y

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
have *: "(\<lambda>n. to_Gromov_completion (u n)) \<longlonglongrightarrow> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. to_Gromov_completion (u n)) \<longlonglongrightarrow> y
[PROOF STEP]
unfolding u_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. to_Gromov_completion (rep_Gromov_completion y n)) \<longlonglongrightarrow> y
[PROOF STEP]
using rep_Gromov_completion_limit
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. to_Gromov_completion (rep_Gromov_completion ?x n)) \<longlonglongrightarrow> ?x

goal (1 subgoal):
 1. (\<lambda>n. to_Gromov_completion (rep_Gromov_completion y n)) \<longlonglongrightarrow> y
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<lambda>n. to_Gromov_completion (u n)) \<longlonglongrightarrow> y

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
have "\<exists>v. \<forall>n. dist (f (v n)) (u n) \<le> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v. \<forall>n. dist (f (v n)) (u n) \<le> C
[PROOF STEP]
apply (intro choice)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. \<exists>y. dist (f y) (u n) \<le> C
[PROOF STEP]
using quasi_isometry_betweenD(3)[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
?y \<in> UNIV \<Longrightarrow> \<exists>x\<in>UNIV. dist (f x) ?y \<le> C

goal (1 subgoal):
 1. \<forall>n. \<exists>y. dist (f y) (u n) \<le> C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>v. \<forall>n. dist (f (v n)) (u n) \<le> C

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>v. \<forall>n. dist (f (v n)) (u n) \<le> C
[PROOF STEP]
obtain v where v: "\<And>n. dist (f (v n)) (u n) \<le> C"
[PROOF STATE]
proof (prove)
using this:
\<exists>v. \<forall>n. dist (f (v n)) (u n) \<le> C

goal (1 subgoal):
 1. (\<And>v. (\<And>n. dist (f (v n)) (u n) \<le> C) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dist (f (v ?n)) (u ?n) \<le> C

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
have *: "(\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y
[PROOF STEP]
apply (rule Gromov_converging_at_boundary_bounded_perturbation[OF * \<open>y \<in> Gromov_boundary\<close>])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. dist (u n) (f (v n)) \<le> ?C
[PROOF STEP]
using v
[PROOF STATE]
proof (prove)
using this:
dist (f (v ?n)) (u ?n) \<le> C

goal (1 subgoal):
 1. \<And>n. dist (u n) (f (v n)) \<le> ?C
[PROOF STEP]
by (simp add: dist_commute)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y
[PROOF STEP]
have "Gromov_converging_at_boundary (\<lambda>n. f (v n))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y

goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (v n))
[PROOF STEP]
using assms(2) lim_imp_Gromov_converging_at_boundary
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y
y \<in> Gromov_boundary
\<lbrakk>(\<lambda>n. to_Gromov_completion (?u n)) \<longlonglongrightarrow> ?x; ?x \<in> Gromov_boundary\<rbrakk> \<Longrightarrow> Gromov_converging_at_boundary ?u

goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (v n))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
Gromov_converging_at_boundary (\<lambda>n. f (v n))

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Gromov_converging_at_boundary (\<lambda>n. f (v n))
[PROOF STEP]
have "Gromov_converging_at_boundary v"
[PROOF STATE]
proof (prove)
using this:
Gromov_converging_at_boundary (\<lambda>n. f (v n))

goal (1 subgoal):
 1. Gromov_converging_at_boundary v
[PROOF STEP]
using Gromov_converging_at_infinity_quasi_isometry[OF quasi_isometry_betweenD(1)[OF assms(1)]]
[PROOF STATE]
proof (prove)
using this:
Gromov_converging_at_boundary (\<lambda>n. f (v n))
Gromov_converging_at_boundary (\<lambda>n. f (?u n)) = Gromov_converging_at_boundary ?u

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

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Gromov_converging_at_boundary v
[PROOF STEP]
obtain x where "x \<in> Gromov_boundary" "(\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x"
[PROOF STATE]
proof (prove)
using this:
Gromov_converging_at_boundary v

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> Gromov_boundary; (\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Gromov_converging_at_boundary_converges
[PROOF STATE]
proof (prove)
using this:
Gromov_converging_at_boundary v
Gromov_converging_at_boundary ?u \<Longrightarrow> \<exists>x\<in>Gromov_boundary. (\<lambda>n. to_Gromov_completion (?u n)) \<longlonglongrightarrow> x

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> Gromov_boundary; (\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> Gromov_boundary
(\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> Gromov_boundary
(\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x
[PROOF STEP]
have "(\<lambda>n. (Gromov_extension f) (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x"
[PROOF STATE]
proof (prove)
using this:
x \<in> Gromov_boundary
(\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x

goal (1 subgoal):
 1. (\<lambda>n. Gromov_extension f (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x
[PROOF STEP]
using isCont_tendsto_compose[OF Gromov_extension_continuous[OF quasi_isometry_betweenD(1)[OF assms(1)] \<open>x \<in> Gromov_boundary\<close>]]
[PROOF STATE]
proof (prove)
using this:
x \<in> Gromov_boundary
(\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> x
(?f \<longlongrightarrow> x) ?F \<Longrightarrow> ((\<lambda>x. Gromov_extension f (?f x)) \<longlongrightarrow> Gromov_extension f x) ?F

goal (1 subgoal):
 1. (\<lambda>n. Gromov_extension f (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x
[PROOF STEP]
have "y = Gromov_extension f x"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x

goal (1 subgoal):
 1. y = Gromov_extension f x
[PROOF STEP]
using * LIMSEQ_unique
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion (v n))) \<longlonglongrightarrow> Gromov_extension f x
(\<lambda>n. to_Gromov_completion (f (v n))) \<longlonglongrightarrow> y
\<lbrakk>?X \<longlonglongrightarrow> ?a; ?X \<longlonglongrightarrow> ?b\<rbrakk> \<Longrightarrow> ?a = ?b

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

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y = Gromov_extension f x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y = Gromov_extension f x

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
using \<open>x \<in> Gromov_boundary\<close>
[PROOF STATE]
proof (prove)
using this:
y = Gromov_extension f x
x \<in> Gromov_boundary

goal (1 subgoal):
 1. \<exists>x\<in>Gromov_boundary. Gromov_extension f x = y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>x\<in>Gromov_boundary. Gromov_extension f x = y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma GrD1: "(x, fx) \<in> Gr A f \<Longrightarrow> x \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x, fx) \<in> Gr A f \<Longrightarrow> x \<in> A
[PROOF STEP]
unfolding Gr_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x, fx) \<in> {(a, f a) |a. a \<in> A} \<Longrightarrow> x \<in> A
[PROOF STEP]
by simp


[STATEMENT]
lemma is_nth_power_upto_unit_unit [simp, intro]:
  assumes "is_unit x"
  shows   "is_nth_power_upto_unit n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_nth_power_upto_unit n x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_unit x

goal (1 subgoal):
 1. is_nth_power_upto_unit n x
[PROOF STEP]
by (auto simp: is_nth_power_upto_unit_def intro!: exI[of _ "1 div x"])


[STATEMENT]
theorem r_step_equiv_step:
  assumes "valid (fst c)"
  shows "eval r_step [encode_config c] \<down>= encode_config (step c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval r_step [encode_config c] \<down>= encode_config (step c)
[PROOF STEP]
using r_step estep assms
[PROOF STATE]
proof (prove)
using this:
eval r_step [?e] \<down>= estep ?e
valid (fst ?c) \<Longrightarrow> estep (encode_config ?c) = encode_config (step ?c)
valid (fst c)

goal (1 subgoal):
 1. eval r_step [encode_config c] \<down>= encode_config (step c)
[PROOF STEP]
by simp


[STATEMENT]
lemma ideal_ofI: "(\<And>a. a \<in> A \<Longrightarrow> poly_eval a f = 0) \<Longrightarrow> f \<in> \<I> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a. a \<in> A \<Longrightarrow> poly_eval a f = (0::'b)) \<Longrightarrow> f \<in> \<I> A
[PROOF STEP]
by (simp add: ideal_of_def)


[STATEMENT]
lemma uconnected_symI: "(u,v) \<in> uconnected E \<Longrightarrow> (v,u) \<in> uconnected E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u, v) \<in> uconnected E \<Longrightarrow> (v, u) \<in> uconnected E
[PROOF STEP]
using uconnected_sym sym_def
[PROOF STATE]
proof (prove)
using this:
sym (uconnected ?E)
sym ?r = (\<forall>x y. (x, y) \<in> ?r \<longrightarrow> (y, x) \<in> ?r)

goal (1 subgoal):
 1. (u, v) \<in> uconnected E \<Longrightarrow> (v, u) \<in> uconnected E
[PROOF STEP]
by fast


[STATEMENT]
lemma evimage_Collect_eq [simp]: "f \<inverse>\<^bsub>n\<^esub> Collect p = {y \<in> carrier (R\<^bsup>n\<^esup>). p (f y)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<inverse>\<^bsub>n\<^esub> Collect p = {y \<in> carrier (R\<^bsup>n\<^esup>). p (f y)}
[PROOF STEP]
unfolding evimage_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f -` Collect p \<inter> carrier (R\<^bsup>n\<^esup>) = {y \<in> carrier (R\<^bsup>n\<^esup>). p (f y)}
[PROOF STEP]
by blast


[STATEMENT]
lemma add_edge_is_path:
    assumes "is_path_undir G x p y"
    shows "is_path_undir (add_edge a b c G) x p y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_path_undir (add_edge a b c G) x p y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_path_undir (add_edge a b c G) x p y
[PROOF STEP]
from E_valid
[PROOF STATE]
proof (chain)
picking this:
fst ` E \<subseteq> V
snd ` snd ` E \<subseteq> V
[PROOF STEP]
have "valid_graph (add_edge a b c G)"
[PROOF STATE]
proof (prove)
using this:
fst ` E \<subseteq> V
snd ` snd ` E \<subseteq> V

goal (1 subgoal):
 1. valid_graph (add_edge a b c G)
[PROOF STEP]
unfolding valid_graph_def add_edge_def
[PROOF STATE]
proof (prove)
using this:
fst ` E \<subseteq> V
snd ` snd ` E \<subseteq> V

goal (1 subgoal):
 1. fst ` edges \<lparr>nodes = {a, c} \<union> V, edges = insert (a, b, c) E\<rparr> \<subseteq> nodes \<lparr>nodes = {a, c} \<union> V, edges = insert (a, b, c) E\<rparr> \<and> snd ` snd ` edges \<lparr>nodes = {a, c} \<union> V, edges = insert (a, b, c) E\<rparr> \<subseteq> nodes \<lparr>nodes = {a, c} \<union> V, edges = insert (a, b, c) E\<rparr>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
valid_graph (add_edge a b c G)

goal (1 subgoal):
 1. is_path_undir (add_edge a b c G) x p y
[PROOF STEP]
with assms is_path_undir.simps[of "add_edge a b c G"]
[PROOF STATE]
proof (chain)
picking this:
is_path_undir G x p y
is_path_undir (add_edge a b c G) ?v [] ?v' = (?v = ?v' \<and> ?v' \<in> nodes (add_edge a b c G))
is_path_undir (add_edge a b c G) ?v ((?v1.0, ?w, ?v2.0) # ?p) ?v' = (?v = ?v1.0 \<and> ((?v1.0, ?w, ?v2.0) \<in> edges (add_edge a b c G) \<or> (?v2.0, ?w, ?v1.0) \<in> edges (add_edge a b c G)) \<and> is_path_undir (add_edge a b c G) ?v2.0 ?p ?v')
valid_graph (add_edge a b c G)
[PROOF STEP]
show "is_path_undir (add_edge a b c G) x p y"
[PROOF STATE]
proof (prove)
using this:
is_path_undir G x p y
is_path_undir (add_edge a b c G) ?v [] ?v' = (?v = ?v' \<and> ?v' \<in> nodes (add_edge a b c G))
is_path_undir (add_edge a b c G) ?v ((?v1.0, ?w, ?v2.0) # ?p) ?v' = (?v = ?v1.0 \<and> ((?v1.0, ?w, ?v2.0) \<in> edges (add_edge a b c G) \<or> (?v2.0, ?w, ?v1.0) \<in> edges (add_edge a b c G)) \<and> is_path_undir (add_edge a b c G) ?v2.0 ?p ?v')
valid_graph (add_edge a b c G)

goal (1 subgoal):
 1. is_path_undir (add_edge a b c G) x p y
[PROOF STEP]
by (induction p arbitrary: x y) auto
[PROOF STATE]
proof (state)
this:
is_path_undir (add_edge a b c G) x p y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma injf_max_order_preserving: "\<forall>x. \<exists>y \<in> E. x < y \<Longrightarrow> injf_max n E < injf_max (Suc n) E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. \<exists>y\<in>E. x < y \<Longrightarrow> injf_max n E < injf_max (Suc n) E
[PROOF STEP]
by (metis (no_types, lifting) choicefun_mem_set empty_iff injf_max.simps(2) mem_Collect_eq)


[STATEMENT]
lemma gtrI_s: "((s,c),e,(s',c'))\<in>gtrs \<Longrightarrow> (add_mset s c,e,add_mset s' c')\<in>gtr gtrs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((s, c), e, s', c') \<in> gtrs \<Longrightarrow> (add_mset s c, e, add_mset s' c') \<in> gtr gtrs
[PROOF STEP]
by (unfold gtr_def, auto)


[STATEMENT]
lemma dims_product:
  "d0 = d1 * d2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d0 = d1 * d2
[PROOF STEP]
unfolding d0_def d1_def d2_def dims0_def dims1_def dims2_def vars0_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod_list (nths dims (vars1 \<union> vars2)) = prod_list (nths dims vars1) * prod_list (nths dims vars2)
[PROOF STEP]
using disjoint nths_prod_list_split[of vars1 "vars1 \<union> vars2" dims]
[PROOF STATE]
proof (prove)
using this:
vars1 \<inter> vars2 = {}
vars1 \<subseteq> vars1 \<union> vars2 \<Longrightarrow> prod_list (nths dims (vars1 \<union> vars2)) = prod_list (nths dims vars1) * prod_list (nths dims (vars1 \<union> vars2 - vars1))

goal (1 subgoal):
 1. prod_list (nths dims (vars1 \<union> vars2)) = prod_list (nths dims vars1) * prod_list (nths dims vars2)
[PROOF STEP]
apply (subgoal_tac "vars1 \<union> vars2 - vars1 = vars2")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>vars1 \<inter> vars2 = {}; vars1 \<subseteq> vars1 \<union> vars2 \<Longrightarrow> prod_list (nths dims (vars1 \<union> vars2)) = prod_list (nths dims vars1) * prod_list (nths dims (vars1 \<union> vars2 - vars1)); vars1 \<union> vars2 - vars1 = vars2\<rbrakk> \<Longrightarrow> prod_list (nths dims (vars1 \<union> vars2)) = prod_list (nths dims vars1) * prod_list (nths dims vars2)
 2. \<lbrakk>vars1 \<inter> vars2 = {}; vars1 \<subseteq> vars1 \<union> vars2 \<Longrightarrow> prod_list (nths dims (vars1 \<union> vars2)) = prod_list (nths dims vars1) * prod_list (nths dims (vars1 \<union> vars2 - vars1))\<rbrakk> \<Longrightarrow> vars1 \<union> vars2 - vars1 = vars2
[PROOF STEP]
by auto


[STATEMENT]
lemma main_int_poly_factorization:
  assumes res: "main_int_poly_factorization f = fs"
  and sf: "square_free f"
  and df: "degree f > 0"
  and nz: "coeff f 0 \<noteq> 0"
shows "f = prod_list fs \<and> (\<forall> fi \<in> set fs. irreducible\<^sub>d fi)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
proof (cases "degree f = 1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. degree f = 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
 2. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
degree f = 1

goal (2 subgoals):
 1. degree f = 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
 2. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
with res[unfolded main_int_poly_factorization_def Let_def]
[PROOF STATE]
proof (chain)
picking this:
(if degree f = 1 then [f] else if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs
degree f = 1
[PROOF STEP]
have "fs = [f]"
[PROOF STATE]
proof (prove)
using this:
(if degree f = 1 then [f] else if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs
degree f = 1

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

goal (2 subgoals):
 1. degree f = 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
 2. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
with True
[PROOF STATE]
proof (chain)
picking this:
degree f = 1
fs = [f]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
degree f = 1
fs = [f]

goal (1 subgoal):
 1. f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)

goal (1 subgoal):
 1. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
degree f \<noteq> 1

goal (1 subgoal):
 1. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
hence *: "(if degree f = 1 then t :: int poly list else e) = e" for t e
[PROOF STATE]
proof (prove)
using this:
degree f \<noteq> 1

goal (1 subgoal):
 1. (if degree f = 1 then t else e) = e
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(if degree f = 1 then ?t else ?e) = ?e

goal (1 subgoal):
 1. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
note res = res[unfolded main_int_poly_factorization_def Let_def *]
[PROOF STATE]
proof (state)
this:
(if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs

goal (1 subgoal):
 1. degree f \<noteq> 1 \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
proof (cases "abs (coeff f 0) < abs (coeff f (degree f))")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
 2. \<not> \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar>

goal (2 subgoals):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
 2. \<not> \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
with res
[PROOF STATE]
proof (chain)
picking this:
(if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs
\<not> \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar>
[PROOF STEP]
have "int_poly_factorization_algorithm alg f = fs"
[PROOF STATE]
proof (prove)
using this:
(if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs
\<not> \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar>

goal (1 subgoal):
 1. int_poly_factorization_algorithm alg f = fs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int_poly_factorization_algorithm alg f = fs

goal (2 subgoals):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
 2. \<not> \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from int_poly_factorization_algorithm_irreducible\<^sub>d[OF this sf df]
[PROOF STATE]
proof (chain)
picking this:
f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)

goal (1 subgoal):
 1. f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar>

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
let ?f = "reflect_poly f"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from square_free_reflect_poly[OF sf nz]
[PROOF STATE]
proof (chain)
picking this:
square_free (reflect_poly f)
[PROOF STEP]
have sf: "square_free ?f"
[PROOF STATE]
proof (prove)
using this:
square_free (reflect_poly f)

goal (1 subgoal):
 1. square_free (reflect_poly f)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
square_free (reflect_poly f)

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from nz df
[PROOF STATE]
proof (chain)
picking this:
coeff f 0 \<noteq> 0
0 < degree f
[PROOF STEP]
have df: "degree ?f > 0"
[PROOF STATE]
proof (prove)
using this:
coeff f 0 \<noteq> 0
0 < degree f

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

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from True res
[PROOF STATE]
proof (chain)
picking this:
\<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar>
(if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs
[PROOF STEP]
obtain gs where fs: "fs = map reflect_poly gs"
      and gs: "int_poly_factorization_algorithm alg (reflect_poly f) = gs"
[PROOF STATE]
proof (prove)
using this:
\<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar>
(if \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> then map reflect_poly (int_poly_factorization_algorithm alg (reflect_poly f)) else int_poly_factorization_algorithm alg f) = fs

goal (1 subgoal):
 1. (\<And>gs. \<lbrakk>fs = map reflect_poly gs; int_poly_factorization_algorithm alg (reflect_poly f) = gs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fs = map reflect_poly gs
int_poly_factorization_algorithm alg (reflect_poly f) = gs

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from int_poly_factorization_algorithm_irreducible\<^sub>d[OF gs sf df]
[PROOF STATE]
proof (chain)
picking this:
reflect_poly f = prod_list gs \<and> (\<forall>fi\<in>set gs. irreducible\<^sub>d fi)
[PROOF STEP]
have id: "reflect_poly ?f = reflect_poly (prod_list gs)" "?f = prod_list gs"
      and irr: "\<And> gi. gi \<in> set gs \<Longrightarrow> irreducible\<^sub>d gi"
[PROOF STATE]
proof (prove)
using this:
reflect_poly f = prod_list gs \<and> (\<forall>fi\<in>set gs. irreducible\<^sub>d fi)

goal (1 subgoal):
 1. (reflect_poly (reflect_poly f) = reflect_poly (prod_list gs) &&& reflect_poly f = prod_list gs) &&& (\<And>gi. gi \<in> set gs \<Longrightarrow> irreducible\<^sub>d gi)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
reflect_poly (reflect_poly f) = reflect_poly (prod_list gs)
reflect_poly f = prod_list gs
?gi \<in> set gs \<Longrightarrow> irreducible\<^sub>d ?gi

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from id(1)
[PROOF STATE]
proof (chain)
picking this:
reflect_poly (reflect_poly f) = reflect_poly (prod_list gs)
[PROOF STEP]
have f_fs: "f = prod_list fs"
[PROOF STATE]
proof (prove)
using this:
reflect_poly (reflect_poly f) = reflect_poly (prod_list gs)

goal (1 subgoal):
 1. f = prod_list fs
[PROOF STEP]
unfolding fs
[PROOF STATE]
proof (prove)
using this:
reflect_poly (reflect_poly f) = reflect_poly (prod_list gs)

goal (1 subgoal):
 1. f = prod_list (map reflect_poly gs)
[PROOF STEP]
using nz
[PROOF STATE]
proof (prove)
using this:
reflect_poly (reflect_poly f) = reflect_poly (prod_list gs)
coeff f 0 \<noteq> 0

goal (1 subgoal):
 1. f = prod_list (map reflect_poly gs)
[PROOF STEP]
by (simp add: reflect_poly_prod_list)
[PROOF STATE]
proof (state)
this:
f = prod_list fs

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
f = prod_list fs

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
fix fi
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
assume "fi \<in> set fs"
[PROOF STATE]
proof (state)
this:
fi \<in> set fs

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from this[unfolded fs]
[PROOF STATE]
proof (chain)
picking this:
fi \<in> set (map reflect_poly gs)
[PROOF STEP]
obtain gi where gi: "gi \<in> set gs" and fi: "fi = reflect_poly gi"
[PROOF STATE]
proof (prove)
using this:
fi \<in> set (map reflect_poly gs)

goal (1 subgoal):
 1. (\<And>gi. \<lbrakk>gi \<in> set gs; fi = reflect_poly gi\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
gi \<in> set gs
fi = reflect_poly gi

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
gi \<in> set gs
fi = reflect_poly gi

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
assume "coeff gi 0 = 0"
[PROOF STATE]
proof (state)
this:
coeff gi 0 = 0

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
with id(2) split_list[OF gi]
[PROOF STATE]
proof (chain)
picking this:
reflect_poly f = prod_list gs
\<exists>ys zs. gs = ys @ gi # zs
coeff gi 0 = 0
[PROOF STEP]
have "coeff ?f 0 = 0"
[PROOF STATE]
proof (prove)
using this:
reflect_poly f = prod_list gs
\<exists>ys zs. gs = ys @ gi # zs
coeff gi 0 = 0

goal (1 subgoal):
 1. coeff (reflect_poly f) 0 = 0
[PROOF STEP]
by (auto simp: coeff_mult)
[PROOF STATE]
proof (state)
this:
coeff (reflect_poly f) 0 = 0

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
with nz
[PROOF STATE]
proof (chain)
picking this:
coeff f 0 \<noteq> 0
coeff (reflect_poly f) 0 = 0
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
using this:
coeff f 0 \<noteq> 0
coeff (reflect_poly f) 0 = 0

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

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
coeff gi 0 = 0 \<Longrightarrow> False

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
hence nzg: "coeff gi 0 \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
coeff gi 0 = 0 \<Longrightarrow> False

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

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
from irreducible\<^sub>d_reflect_poly[OF nzg] irr[OF gi]
[PROOF STATE]
proof (chain)
picking this:
irreducible\<^sub>d (reflect_poly gi) = irreducible\<^sub>d gi
irreducible\<^sub>d gi
[PROOF STEP]
have "irreducible\<^sub>d fi"
[PROOF STATE]
proof (prove)
using this:
irreducible\<^sub>d (reflect_poly gi) = irreducible\<^sub>d gi
irreducible\<^sub>d gi

goal (1 subgoal):
 1. irreducible\<^sub>d fi
[PROOF STEP]
unfolding fi
[PROOF STATE]
proof (prove)
using this:
irreducible\<^sub>d (reflect_poly gi) = irreducible\<^sub>d gi
irreducible\<^sub>d gi

goal (1 subgoal):
 1. irreducible\<^sub>d (reflect_poly gi)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
irreducible\<^sub>d fi

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?fi2 \<in> set fs \<Longrightarrow> irreducible\<^sub>d ?fi2

goal (1 subgoal):
 1. \<bar>coeff f 0\<bar> < \<bar>lead_coeff f\<bar> \<Longrightarrow> f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
with f_fs
[PROOF STATE]
proof (chain)
picking this:
f = prod_list fs
?fi2 \<in> set fs \<Longrightarrow> irreducible\<^sub>d ?fi2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f = prod_list fs
?fi2 \<in> set fs \<Longrightarrow> irreducible\<^sub>d ?fi2

goal (1 subgoal):
 1. f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f = prod_list fs \<and> (\<forall>fi\<in>set fs. irreducible\<^sub>d fi)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma le_fininfE[elim 0]:
      assumes "w\<^sub>1 \<preceq>\<^sub>F\<^sub>I w\<^sub>2"
      obtains v\<^sub>2
      where "v\<^sub>2 \<le>\<^sub>F\<^sub>I w\<^sub>2" "w\<^sub>1 \<preceq>\<^sub>F v\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v\<^sub>2. \<lbrakk>v\<^sub>2 \<le>\<^sub>F\<^sub>I w\<^sub>2; w\<^sub>1 \<preceq>\<^sub>F v\<^sub>2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
w\<^sub>1 \<preceq>\<^sub>F\<^sub>I w\<^sub>2

goal (1 subgoal):
 1. (\<And>v\<^sub>2. \<lbrakk>v\<^sub>2 \<le>\<^sub>F\<^sub>I w\<^sub>2; w\<^sub>1 \<preceq>\<^sub>F v\<^sub>2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding le_fininf_def
[PROOF STATE]
proof (prove)
using this:
\<exists>v\<^sub>2. v\<^sub>2 \<le>\<^sub>F\<^sub>I w\<^sub>2 \<and> w\<^sub>1 \<preceq>\<^sub>F v\<^sub>2

goal (1 subgoal):
 1. (\<And>v\<^sub>2. \<lbrakk>v\<^sub>2 \<le>\<^sub>F\<^sub>I w\<^sub>2; w\<^sub>1 \<preceq>\<^sub>F v\<^sub>2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto


[STATEMENT]
lemma nba_image_language[simp]:
    assumes "inj_on f (nodes A)"
    shows "language (nba_image f A) = language A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. language (nba_image f A) = language A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. language (nba_image f A) = language A
[PROOF STEP]
have "(language A, language (nba_image f A)) \<in> \<langle>\<langle>Id_on (alphabet A)\<rangle> stream_rel\<rangle> set_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (language A, language (nba_image f A)) \<in> \<langle>\<langle>Id_on (alphabet A)\<rangle>stream_rel\<rangle>set_rel
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
inj_on f (nodes A)

goal (1 subgoal):
 1. (language A, language (nba_image f A)) \<in> \<langle>\<langle>Id_on (alphabet A)\<rangle>stream_rel\<rangle>set_rel
[PROOF STEP]
by parametricity
[PROOF STATE]
proof (state)
this:
(language A, language (nba_image f A)) \<in> \<langle>\<langle>Id_on (alphabet A)\<rangle>stream_rel\<rangle>set_rel

goal (1 subgoal):
 1. language (nba_image f A) = language A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(language A, language (nba_image f A)) \<in> \<langle>\<langle>Id_on (alphabet A)\<rangle>stream_rel\<rangle>set_rel
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(language A, language (nba_image f A)) \<in> \<langle>\<langle>Id_on (alphabet A)\<rangle>stream_rel\<rangle>set_rel

goal (1 subgoal):
 1. language (nba_image f A) = language A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
language (nba_image f A) = language A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma row_spaceI:
  assumes "x = v \<^sub>v* A"
  shows "x \<in> row_space A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> row_space A
[PROOF STEP]
unfolding row_space_def assms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<^sub>v* A \<in> (\<lambda>v. v \<^sub>v* A) ` carrier_vec (dim_row A)
[PROOF STEP]
by (rule, fact mult_mat_vec_resize, fact resize_vec_carrier)


[STATEMENT]
lemma degree_mult_leq :
  assumes pnonzero: "(p::real mpoly)\<noteq>0"
  assumes qnonzero: "(q::real mpoly)\<noteq>0"
  shows "MPoly_Type.degree ((p::real mpoly) * (q::real mpoly)) var \<le> (MPoly_Type.degree p var) + (MPoly_Type.degree q var)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
proof(cases "MPoly_Type.degree (p*q) var =0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. MPoly_Type.degree (p * q) var = 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
 2. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree (p * q) var = 0

goal (2 subgoals):
 1. MPoly_Type.degree (p * q) var = 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
 2. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
MPoly_Type.degree (p * q) var = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
MPoly_Type.degree (p * q) var = 0

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree (p * q) var \<noteq> 0

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
have hp: "\<forall>m\<in>monomials p. lookup m var \<le> MPoly_Type.degree p var"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m\<in>monomials p. lookup m var \<le> MPoly_Type.degree p var
[PROOF STEP]
using degree_eq_iff
[PROOF STATE]
proof (prove)
using this:
(MPoly_Type.degree ?p ?x = ?k) = (if ?k = 0 then \<forall>m\<in>monomials ?p. lookup m ?x = 0 else (\<exists>m\<in>monomials ?p. lookup m ?x = ?k) \<and> (\<forall>m\<in>monomials ?p. lookup m ?x \<le> ?k))

goal (1 subgoal):
 1. \<forall>m\<in>monomials p. lookup m var \<le> MPoly_Type.degree p var
[PROOF STEP]
by (metis zero_le)
[PROOF STATE]
proof (state)
this:
\<forall>m\<in>monomials p. lookup m var \<le> MPoly_Type.degree p var

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
have hq: "\<forall>m\<in>monomials q. lookup m var \<le> MPoly_Type.degree q var"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m\<in>monomials q. lookup m var \<le> MPoly_Type.degree q var
[PROOF STEP]
using degree_eq_iff
[PROOF STATE]
proof (prove)
using this:
(MPoly_Type.degree ?p ?x = ?k) = (if ?k = 0 then \<forall>m\<in>monomials ?p. lookup m ?x = 0 else (\<exists>m\<in>monomials ?p. lookup m ?x = ?k) \<and> (\<forall>m\<in>monomials ?p. lookup m ?x \<le> ?k))

goal (1 subgoal):
 1. \<forall>m\<in>monomials q. lookup m var \<le> MPoly_Type.degree q var
[PROOF STEP]
by (metis zero_le)
[PROOF STATE]
proof (state)
this:
\<forall>m\<in>monomials q. lookup m var \<le> MPoly_Type.degree q var

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
have hpq: "\<forall>m\<in>{a+b | a b . a \<in> monomials p \<and> b \<in> monomials q}.
      lookup m var \<le> (MPoly_Type.degree p var) + (MPoly_Type.degree q var)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m\<in>{a + b |a b. a \<in> monomials p \<and> b \<in> monomials q}. lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
by (smt add_le_mono hp hq mem_Collect_eq plus_poly_mapping.rep_eq)
[PROOF STATE]
proof (state)
this:
\<forall>m\<in>{a + b |a b. a \<in> monomials p \<and> b \<in> monomials q}. lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
have h1: "(\<forall>m\<in>monomials (p*q). lookup m var \<le> (MPoly_Type.degree p var) + (MPoly_Type.degree q var))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
using mult_monomials_dir_one hpq
[PROOF STATE]
proof (prove)
using this:
monomials (?p * ?q) \<subseteq> {a + b |a b. a \<in> monomials ?p \<and> b \<in> monomials ?q}
\<forall>m\<in>{a + b |a b. a \<in> monomials p \<and> b \<in> monomials q}. lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var

goal (1 subgoal):
 1. \<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<noteq> 0 \<Longrightarrow> MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
using h1 degree_eq_iff False
[PROOF STATE]
proof (prove)
using this:
\<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
\<forall>m\<in>monomials (p * q). lookup m var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
(MPoly_Type.degree ?p ?x = ?k) = (if ?k = 0 then \<forall>m\<in>monomials ?p. lookup m ?x = 0 else (\<exists>m\<in>monomials ?p. lookup m ?x = ?k) \<and> (\<forall>m\<in>monomials ?p. lookup m ?x \<le> ?k))
MPoly_Type.degree (p * q) var \<noteq> 0

goal (1 subgoal):
 1. MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var
[PROOF STEP]
by (simp add: degree_le_iff)
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree (p * q) var \<le> MPoly_Type.degree p var + MPoly_Type.degree q var

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inf_less_eq_cases_2:
  "-x \<sqinter> -y \<le> -x \<sqinter> -z \<Longrightarrow> --x \<sqinter> -y \<le> --x \<sqinter> -z \<Longrightarrow> -y \<le> -z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>- x \<sqinter> - y \<le> - x \<sqinter> - z; - - x \<sqinter> - y \<le> - - x \<sqinter> - z\<rbrakk> \<Longrightarrow> - y \<le> - z
[PROOF STEP]
by (metis greatest_lower_bound inf_closed inf_less_eq_cases)


[STATEMENT]
lemma ordstNS_ordst_trans:
"ordstNS X Y \<Longrightarrow> ordst Y Z \<Longrightarrow> ordst X Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ordstNS X Y; ordst Y Z\<rbrakk> \<Longrightarrow> ordst X Z
[PROOF STEP]
by (metis ordstNS_def ordst_trans)


[STATEMENT]
theorem tarski_s_euclid_implies_playfair_s_postulate:
  assumes "TarskiSParallelPostulate"
  shows "PlayfairSPostulate"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
fix A1 A2 B1 B2 P C1 C2
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
assume P1: "\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2"
[PROOF STATE]
proof (state)
this:
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P1A: "\<not> Col P A1 A2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col P A1 A2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
\<not> Col P A1 A2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P2: "A1 A2 Par B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 Par B1 B2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
A1 A2 Par B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P3: "Col P B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col P B1 B2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
Col P B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P4: "A1 A2 Par C1 C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 Par C1 C2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
A1 A2 Par C1 C2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P5: "Col P C1 C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col P C1 C2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
Col P C1 C2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P6: "A1 A2 ParStrict B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
have "A1 A2 Par B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 Par B1 B2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
A1 A2 Par B1 B2

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
A1 A2 Par B1 B2

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
have "Col B1 B2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col B1 B2 P
[PROOF STEP]
using P3 not_col_permutation_2
[PROOF STATE]
proof (prove)
using this:
Col P B1 B2
\<not> Col ?A ?B ?C \<Longrightarrow> \<not> Col ?C ?A ?B

goal (1 subgoal):
 1. Col B1 B2 P
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col B1 B2 P

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col B1 B2 P

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
have "\<not> Col A1 A2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col A1 A2 P
[PROOF STEP]
by (simp add: P1A not_col_permutation_1)
[PROOF STATE]
proof (state)
this:
\<not> Col A1 A2 P

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
A1 A2 Par B1 B2
Col B1 B2 P
\<not> Col A1 A2 P
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A1 A2 Par B1 B2
Col B1 B2 P
\<not> Col A1 A2 P

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
using par_not_col_strict
[PROOF STATE]
proof (prove)
using this:
A1 A2 Par B1 B2
Col B1 B2 P
\<not> Col A1 A2 P
\<lbrakk>?A ?B Par ?C ?D; Col ?C ?D ?P; \<not> Col ?A ?B ?P\<rbrakk> \<Longrightarrow> ?A ?B ParStrict ?C ?D

goal (1 subgoal):
 1. A1 A2 ParStrict B1 B2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict B1 B2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have P7: "A1 A2 ParStrict C1 C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
have "A1 A2 Par C1 C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 Par C1 C2
[PROOF STEP]
by (simp add: P1)
[PROOF STATE]
proof (state)
this:
A1 A2 Par C1 C2

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
A1 A2 Par C1 C2

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
have "Col C1 C2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col C1 C2 P
[PROOF STEP]
using Col_cases P1
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2

goal (1 subgoal):
 1. Col C1 C2 P
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col C1 C2 P

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col C1 C2 P

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
have "\<not> Col A1 A2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col A1 A2 P
[PROOF STEP]
by (simp add: P1A not_col_permutation_1)
[PROOF STATE]
proof (state)
this:
\<not> Col A1 A2 P

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
A1 A2 Par C1 C2
Col C1 C2 P
\<not> Col A1 A2 P
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A1 A2 Par C1 C2
Col C1 C2 P
\<not> Col A1 A2 P

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
using par_not_col_strict
[PROOF STATE]
proof (prove)
using this:
A1 A2 Par C1 C2
Col C1 C2 P
\<not> Col A1 A2 P
\<lbrakk>?A ?B Par ?C ?D; Col ?C ?D ?P; \<not> Col ?A ?B ?P\<rbrakk> \<Longrightarrow> ?A ?B ParStrict ?C ?D

goal (1 subgoal):
 1. A1 A2 ParStrict C1 C2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict C1 C2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict C1 C2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict C1 C2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
assume "\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2"
[PROOF STATE]
proof (state)
this:
\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have "\<exists> C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have T2: "Coplanar A1 A2 P A1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A1 A2 P A1
[PROOF STEP]
using ncop_distincts
[PROOF STATE]
proof (prove)
using this:
\<not> Coplanar ?A ?B ?C ?D \<Longrightarrow> ?A \<noteq> ?B \<and> ?A \<noteq> ?C \<and> ?A \<noteq> ?D \<and> ?B \<noteq> ?C \<and> ?B \<noteq> ?D \<and> ?C \<noteq> ?D

goal (1 subgoal):
 1. Coplanar A1 A2 P A1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 P A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have T3: "Coplanar A1 A2 B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A1 A2 B1 B2
[PROOF STEP]
by (simp add: P1 par__coplanar)
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 B1 B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have T4: "Coplanar A1 A2 C1 C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A1 A2 C1 C2
[PROOF STEP]
by (simp add: P7 pars__coplanar)
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 C1 C2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have T5: "Coplanar A1 A2 P B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A1 A2 P B1
[PROOF STEP]
using P1 col_trivial_2 ncop_distincts par__coplanar par_col2_par_bis
[PROOF STATE]
proof (prove)
using this:
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2
Col ?A ?B ?B
\<not> Coplanar ?A ?B ?C ?D \<Longrightarrow> ?A \<noteq> ?B \<and> ?A \<noteq> ?C \<and> ?A \<noteq> ?D \<and> ?B \<noteq> ?C \<and> ?B \<noteq> ?D \<and> ?C \<noteq> ?D
?A ?B Par ?C ?D \<Longrightarrow> Coplanar ?A ?B ?C ?D
\<lbrakk>?E \<noteq> ?F; ?A ?B Par ?C ?D; Col ?E ?F ?C; Col ?E ?F ?D\<rbrakk> \<Longrightarrow> ?A ?B Par ?E ?F

goal (1 subgoal):
 1. Coplanar A1 A2 P B1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 P B1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Coplanar A1 A2 P B1
[PROOF STEP]
have T6: "Coplanar A1 A2 P B2"
[PROOF STATE]
proof (prove)
using this:
Coplanar A1 A2 P B1

goal (1 subgoal):
 1. Coplanar A1 A2 P B2
[PROOF STEP]
using P3 T3 col_cop__cop
[PROOF STATE]
proof (prove)
using this:
Coplanar A1 A2 P B1
Col P B1 B2
Coplanar A1 A2 B1 B2
\<lbrakk>Coplanar ?A ?B ?C ?D; ?C \<noteq> ?D; Col ?C ?D ?E\<rbrakk> \<Longrightarrow> Coplanar ?A ?B ?C ?E

goal (1 subgoal):
 1. Coplanar A1 A2 P B2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 P B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have T7: "Coplanar A1 A2 P C1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A1 A2 P C1
[PROOF STEP]
using P1 T4 col_cop__cop coplanar_perm_1 not_col_permutation_2 par_distincts
[PROOF STATE]
proof (prove)
using this:
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2
Coplanar A1 A2 C1 C2
\<lbrakk>Coplanar ?A ?B ?C ?D; ?C \<noteq> ?D; Col ?C ?D ?E\<rbrakk> \<Longrightarrow> Coplanar ?A ?B ?C ?E
Coplanar ?A ?B ?C ?D \<Longrightarrow> Coplanar ?A ?B ?D ?C
\<not> Col ?A ?B ?C \<Longrightarrow> \<not> Col ?C ?A ?B
?A ?B Par ?C ?D \<Longrightarrow> ?A ?B Par ?C ?D \<and> ?A \<noteq> ?B \<and> ?C \<noteq> ?D

goal (1 subgoal):
 1. Coplanar A1 A2 P C1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 P C1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Coplanar A1 A2 P C1
[PROOF STEP]
have T8: "Coplanar A1 A2 P C2"
[PROOF STATE]
proof (prove)
using this:
Coplanar A1 A2 P C1

goal (1 subgoal):
 1. Coplanar A1 A2 P C2
[PROOF STEP]
using P5 T4 col_cop__cop
[PROOF STATE]
proof (prove)
using this:
Coplanar A1 A2 P C1
Col P C1 C2
Coplanar A1 A2 C1 C2
\<lbrakk>Coplanar ?A ?B ?C ?D; ?C \<noteq> ?D; Col ?C ?D ?E\<rbrakk> \<Longrightarrow> Coplanar ?A ?B ?C ?E

goal (1 subgoal):
 1. Coplanar A1 A2 P C2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 P C2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Coplanar A1 A2 P C2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
assume "\<not> Col C1 B1 B2"
[PROOF STATE]
proof (state)
this:
\<not> Col C1 B1 B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Col C1 B1 B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "C1 \<noteq> C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C1 \<noteq> C2
[PROOF STEP]
using P1 par_neq2
[PROOF STATE]
proof (prove)
using this:
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2
?A ?B Par ?C ?D \<Longrightarrow> ?C \<noteq> ?D

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

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
C1 \<noteq> C2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "Col B1 B2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col B1 B2 P
[PROOF STEP]
using P1 not_col_permutation_2
[PROOF STATE]
proof (prove)
using this:
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2
\<not> Col ?A ?B ?C \<Longrightarrow> \<not> Col ?C ?A ?B

goal (1 subgoal):
 1. Col B1 B2 P
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col B1 B2 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col B1 B2 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "Col C1 C2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col C1 C2 P
[PROOF STEP]
using Col_cases P5
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
Col P C1 C2

goal (1 subgoal):
 1. Col C1 C2 P
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Col C1 C2 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col C1 C2 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "\<not> Col B1 B2 C1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col B1 B2 C1
[PROOF STEP]
using Col_cases calculation(1)
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
\<not> Col C1 B1 B2

goal (1 subgoal):
 1. \<not> Col B1 B2 C1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 C1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 C1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "\<not> Col B1 B2 A1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col B1 B2 A1
[PROOF STEP]
using P6 par_strict_not_col_3
[PROOF STATE]
proof (prove)
using this:
A1 A2 ParStrict B1 B2
?A ?B ParStrict ?C ?D \<Longrightarrow> \<not> Col ?C ?D ?A

goal (1 subgoal):
 1. \<not> Col B1 B2 A1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "Coplanar B1 B2 C1 A1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar B1 B2 C1 A1
[PROOF STEP]
using Col_cases P1A T5 T2 T6 T7 coplanar_pseudo_trans
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
\<not> Col P A1 A2
Coplanar A1 A2 P B1
Coplanar A1 A2 P A1
Coplanar A1 A2 P B2
Coplanar A1 A2 P C1
\<lbrakk>\<not> Col ?P ?Q ?R; Coplanar ?P ?Q ?R ?A; Coplanar ?P ?Q ?R ?B; Coplanar ?P ?Q ?R ?C; Coplanar ?P ?Q ?R ?D\<rbrakk> \<Longrightarrow> Coplanar ?A ?B ?C ?D

goal (1 subgoal):
 1. Coplanar B1 B2 C1 A1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar B1 B2 C1 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> Col C1 B1 B2
C1 \<noteq> C2
Col B1 B2 P
Col C1 C2 P
\<not> Col B1 B2 C1
\<not> Col B1 B2 A1
Coplanar B1 B2 C1 A1
[PROOF STEP]
have "\<exists> C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'"
[PROOF STATE]
proof (prove)
using this:
\<not> Col C1 B1 B2
C1 \<noteq> C2
Col B1 B2 P
Col C1 C2 P
\<not> Col B1 B2 C1
\<not> Col B1 B2 A1
Coplanar B1 B2 C1 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
using cop_not_par_other_side
[PROOF STATE]
proof (prove)
using this:
\<not> Col C1 B1 B2
C1 \<noteq> C2
Col B1 B2 P
Col C1 C2 P
\<not> Col B1 B2 C1
\<not> Col B1 B2 A1
Coplanar B1 B2 C1 A1
\<lbrakk>?C \<noteq> ?D; Col ?A ?B ?I; Col ?C ?D ?I; \<not> Col ?A ?B ?C; \<not> Col ?A ?B ?P; Coplanar ?A ?B ?C ?P\<rbrakk> \<Longrightarrow> \<exists>Q. Col ?C ?D Q \<and> ?A ?B TS ?P Q

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Col C1 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<not> Col C1 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
assume "\<not> Col C2 B1 B2"
[PROOF STATE]
proof (state)
this:
\<not> Col C2 B1 B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Col C2 B1 B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "C2 \<noteq> C1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C2 \<noteq> C1
[PROOF STEP]
using P1 par_neq2
[PROOF STATE]
proof (prove)
using this:
\<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2
?A ?B Par ?C ?D \<Longrightarrow> ?C \<noteq> ?D

goal (1 subgoal):
 1. C2 \<noteq> C1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
C2 \<noteq> C1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
C2 \<noteq> C1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "Col B1 B2 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col B1 B2 P
[PROOF STEP]
using Col_cases P3
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
Col P B1 B2

goal (1 subgoal):
 1. Col B1 B2 P
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Col B1 B2 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col B1 B2 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "Col C2 C1 P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col C2 C1 P
[PROOF STEP]
using Col_cases P5
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
Col P C1 C2

goal (1 subgoal):
 1. Col C2 C1 P
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Col C2 C1 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col C2 C1 P

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "\<not> Col B1 B2 C2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col B1 B2 C2
[PROOF STEP]
by (simp add: calculation(1) not_col_permutation_1)
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 C2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 C2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "\<not> Col B1 B2 A1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col B1 B2 A1
[PROOF STEP]
using P6 par_strict_not_col_3
[PROOF STATE]
proof (prove)
using this:
A1 A2 ParStrict B1 B2
?A ?B ParStrict ?C ?D \<Longrightarrow> \<not> Col ?C ?D ?A

goal (1 subgoal):
 1. \<not> Col B1 B2 A1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> Col B1 B2 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have "Coplanar B1 B2 C2 A1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar B1 B2 C2 A1
[PROOF STEP]
using Col_cases P1A T2 T5 T6 T8 coplanar_pseudo_trans
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
\<not> Col P A1 A2
Coplanar A1 A2 P A1
Coplanar A1 A2 P B1
Coplanar A1 A2 P B2
Coplanar A1 A2 P C2
\<lbrakk>\<not> Col ?P ?Q ?R; Coplanar ?P ?Q ?R ?A; Coplanar ?P ?Q ?R ?B; Coplanar ?P ?Q ?R ?C; Coplanar ?P ?Q ?R ?D\<rbrakk> \<Longrightarrow> Coplanar ?A ?B ?C ?D

goal (1 subgoal):
 1. Coplanar B1 B2 C2 A1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar B1 B2 C2 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> Col C2 B1 B2
C2 \<noteq> C1
Col B1 B2 P
Col C2 C1 P
\<not> Col B1 B2 C2
\<not> Col B1 B2 A1
Coplanar B1 B2 C2 A1
[PROOF STEP]
have "\<exists> C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'"
[PROOF STATE]
proof (prove)
using this:
\<not> Col C2 B1 B2
C2 \<noteq> C1
Col B1 B2 P
Col C2 C1 P
\<not> Col B1 B2 C2
\<not> Col B1 B2 A1
Coplanar B1 B2 C2 A1

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
using cop_not_par_other_side
[PROOF STATE]
proof (prove)
using this:
\<not> Col C2 B1 B2
C2 \<noteq> C1
Col B1 B2 P
Col C2 C1 P
\<not> Col B1 B2 C2
\<not> Col B1 B2 A1
Coplanar B1 B2 C2 A1
\<lbrakk>?C \<noteq> ?D; Col ?A ?B ?I; Col ?C ?D ?I; \<not> Col ?A ?B ?C; \<not> Col ?A ?B ?P; Coplanar ?A ?B ?C ?P\<rbrakk> \<Longrightarrow> \<exists>Q. Col ?C ?D Q \<and> ?A ?B TS ?P Q

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
by (meson not_col_permutation_4)
[PROOF STATE]
proof (state)
this:
\<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Col C2 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> Col C2 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> Col C2 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
using \<open>\<not> Col C1 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'\<close> \<open>\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> Col C2 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
\<not> Col C1 B1 B2 \<Longrightarrow> \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2

goal (1 subgoal):
 1. \<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
obtain C' where W1: "Col C1 C2 C' \<and> B1 B2 TS A1 C'"
[PROOF STATE]
proof (prove)
using this:
\<exists>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. (\<And>C'. Col C1 C2 C' \<and> B1 B2 TS A1 C' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col C1 C2 C' \<and> B1 B2 TS A1 C'
[PROOF STEP]
have W2: "\<not> Col A1 B1 B2"
[PROOF STATE]
proof (prove)
using this:
Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. \<not> Col A1 B1 B2
[PROOF STEP]
using TS_def
[PROOF STATE]
proof (prove)
using this:
Col C1 C2 C' \<and> B1 B2 TS A1 C'
?A ?B TS ?P ?Q \<equiv> \<not> Col ?P ?A ?B \<and> \<not> Col ?Q ?A ?B \<and> (\<exists>T. Col T ?A ?B \<and> Bet ?P T ?Q)

goal (1 subgoal):
 1. \<not> Col A1 B1 B2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<not> Col A1 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
obtain B where W3: "Col B B1 B2 \<and> Bet A1 B C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>B. Col B B1 B2 \<and> Bet A1 B C' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using TS_def W1
[PROOF STATE]
proof (prove)
using this:
?A ?B TS ?P ?Q \<equiv> \<not> Col ?P ?A ?B \<and> \<not> Col ?Q ?A ?B \<and> (\<exists>T. Col T ?A ?B \<and> Bet ?P T ?Q)
Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. (\<And>B. Col B B1 B2 \<and> Bet A1 B C' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col B B1 B2 \<and> Bet A1 B C'

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
obtain C where W4: "P Midpoint C' C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>C. P Midpoint C' C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using symmetric_point_construction
[PROOF STATE]
proof (prove)
using this:
\<exists>P'. ?A Midpoint ?P P'

goal (1 subgoal):
 1. (\<And>C. P Midpoint C' C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
P Midpoint C' C

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P Midpoint C' C
[PROOF STEP]
have W4A: "Bet A1 B C' \<and> Bet C P C'"
[PROOF STATE]
proof (prove)
using this:
P Midpoint C' C

goal (1 subgoal):
 1. Bet A1 B C' \<and> Bet C P C'
[PROOF STEP]
using Mid_cases W3 midpoint_bet
[PROOF STATE]
proof (prove)
using this:
P Midpoint C' C
?A Midpoint ?B ?C \<or> ?A Midpoint ?C ?B \<Longrightarrow> ?A Midpoint ?B ?C
Col B B1 B2 \<and> Bet A1 B C'
?B Midpoint ?A ?C \<Longrightarrow> Bet ?A ?B ?C

goal (1 subgoal):
 1. Bet A1 B C' \<and> Bet C P C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bet A1 B C' \<and> Bet C P C'

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Bet A1 B C' \<and> Bet C P C'
[PROOF STEP]
obtain D where W5: "Bet B D C \<and> Bet P D A1"
[PROOF STATE]
proof (prove)
using this:
Bet A1 B C' \<and> Bet C P C'

goal (1 subgoal):
 1. (\<And>D. Bet B D C \<and> Bet P D A1 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using inner_pasch
[PROOF STATE]
proof (prove)
using this:
Bet A1 B C' \<and> Bet C P C'
\<forall>a b c p q. Bet a p c \<and> Bet b q c \<longrightarrow> (\<exists>x. Bet p x b \<and> Bet q x a)

goal (1 subgoal):
 1. (\<And>D. Bet B D C \<and> Bet P D A1 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bet B D C \<and> Bet P D A1

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have W6: "C' \<noteq> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C' \<noteq> P
[PROOF STEP]
using P3 TS_def W1
[PROOF STATE]
proof (prove)
using this:
Col P B1 B2
?A ?B TS ?P ?Q \<equiv> \<not> Col ?P ?A ?B \<and> \<not> Col ?Q ?A ?B \<and> (\<exists>T. Col T ?A ?B \<and> Bet ?P T ?Q)
Col C1 C2 C' \<and> B1 B2 TS A1 C'

goal (1 subgoal):
 1. C' \<noteq> P
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
C' \<noteq> P

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
C' \<noteq> P
[PROOF STEP]
have "A1 A2 Par C' P"
[PROOF STATE]
proof (prove)
using this:
C' \<noteq> P

goal (1 subgoal):
 1. A1 A2 Par C' P
[PROOF STEP]
by (meson P1 W1 not_col_permutation_2 par_col2_par)
[PROOF STATE]
proof (state)
this:
A1 A2 Par C' P

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have W9: "A1 A2 ParStrict C' P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 A2 ParStrict C' P
[PROOF STEP]
using Col_cases P5 P7 W1 W6 par_strict_col2_par_strict
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<or> Col ?A ?C ?B \<or> Col ?B ?A ?C \<or> Col ?B ?C ?A \<or> Col ?C ?A ?B \<or> Col ?C ?B ?A \<Longrightarrow> Col ?A ?B ?C
Col P C1 C2
A1 A2 ParStrict C1 C2
Col C1 C2 C' \<and> B1 B2 TS A1 C'
C' \<noteq> P
\<lbrakk>?E \<noteq> ?F; ?A ?B ParStrict ?C ?D; Col ?C ?D ?E; Col ?C ?D ?F\<rbrakk> \<Longrightarrow> ?A ?B ParStrict ?E ?F

goal (1 subgoal):
 1. A1 A2 ParStrict C' P
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict C' P

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A1 A2 ParStrict C' P
[PROOF STEP]
have W10: "B \<noteq> P"
[PROOF STATE]
proof (prove)
using this:
A1 A2 ParStrict C' P

goal (1 subgoal):
 1. B \<noteq> P
[PROOF STEP]
by (metis W6 W4A bet_out_1 out_col par_strict_not_col_3)
[PROOF STATE]
proof (state)
this:
B \<noteq> P

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have W11: "P \<noteq> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<noteq> C
[PROOF STEP]
using W6 W4 is_midpoint_id_2
[PROOF STATE]
proof (prove)
using this:
C' \<noteq> P
P Midpoint C' C
?A Midpoint ?B ?A \<Longrightarrow> ?A = ?B

goal (1 subgoal):
 1. P \<noteq> C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
P \<noteq> C

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
P \<noteq> C

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
assume "P = D"
[PROOF STATE]
proof (state)
this:
P = D

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P = D
[PROOF STEP]
have "False"
[PROOF STATE]
proof (prove)
using this:
P = D

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis Col_def P3 W1 W3 W4A W5 W10 W11 col_trivial_2 colx l9_18_R1)
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
P = D \<Longrightarrow> False

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P = D \<Longrightarrow> False
[PROOF STEP]
have "P \<noteq> D"
[PROOF STATE]
proof (prove)
using this:
P = D \<Longrightarrow> False

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

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P \<noteq> D
[PROOF STEP]
obtain X Y where W12: "Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y"
[PROOF STATE]
proof (prove)
using this:
P \<noteq> D

goal (1 subgoal):
 1. (\<And>X Y. Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using W5 assms tarski_s_parallel_postulate_def
[PROOF STATE]
proof (prove)
using this:
P \<noteq> D
Bet B D C \<and> Bet P D A1
TarskiSParallelPostulate
TarskiSParallelPostulate \<equiv> \<forall>A B C D T. Bet A D T \<and> Bet B D C \<and> A \<noteq> D \<longrightarrow> (\<exists>X Y. Bet A B X \<and> Bet A C Y \<and> Bet X T Y)

goal (1 subgoal):
 1. (\<And>X Y. Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y
[PROOF STEP]
have "P \<noteq> X"
[PROOF STATE]
proof (prove)
using this:
Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y

goal (1 subgoal):
 1. P \<noteq> X
[PROOF STEP]
using W10 bet_neq12__neq
[PROOF STATE]
proof (prove)
using this:
Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y
B \<noteq> P
\<lbrakk>Bet ?A ?B ?C; ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<noteq> ?C

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

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P \<noteq> X
[PROOF STEP]
have "A1 A2 ParStrict P X"
[PROOF STATE]
proof (prove)
using this:
P \<noteq> X

goal (1 subgoal):
 1. A1 A2 ParStrict P X
[PROOF STEP]
by (metis Col_cases P3 P6 W10 W12 W3 bet_col colx par_strict_col2_par_strict)
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict P X

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A1 A2 ParStrict P X
[PROOF STEP]
have W15: "A1 A2 OS P X"
[PROOF STATE]
proof (prove)
using this:
A1 A2 ParStrict P X

goal (1 subgoal):
 1. A1 A2 OS P X
[PROOF STEP]
by (simp add: l12_6)
[PROOF STATE]
proof (state)
this:
A1 A2 OS P X

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have "P \<noteq> Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<noteq> Y
[PROOF STEP]
using W11 W12 between_identity
[PROOF STATE]
proof (prove)
using this:
P \<noteq> C
Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y
\<forall>a b. Bet a b a \<longrightarrow> a = b

goal (1 subgoal):
 1. P \<noteq> Y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
P \<noteq> Y

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P \<noteq> Y
[PROOF STEP]
have "A1 A2 ParStrict P Y"
[PROOF STATE]
proof (prove)
using this:
P \<noteq> Y

goal (1 subgoal):
 1. A1 A2 ParStrict P Y
[PROOF STEP]
by (metis Col_def W11 W12 W4A W9 col_trivial_2 par_strict_col2_par_strict)
[PROOF STATE]
proof (state)
this:
A1 A2 ParStrict P Y

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A1 A2 ParStrict P Y
[PROOF STEP]
have W16: "A1 A2 OS P Y"
[PROOF STATE]
proof (prove)
using this:
A1 A2 ParStrict P Y

goal (1 subgoal):
 1. A1 A2 OS P Y
[PROOF STEP]
using l12_6
[PROOF STATE]
proof (prove)
using this:
A1 A2 ParStrict P Y
?A ?B ParStrict ?C ?D \<Longrightarrow> ?A ?B OS ?C ?D

goal (1 subgoal):
 1. A1 A2 OS P Y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A1 A2 OS P Y

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have "Col A1 X Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col A1 X Y
[PROOF STEP]
by (simp add: W12 bet_col col_permutation_4)
[PROOF STATE]
proof (state)
this:
Col A1 X Y

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col A1 X Y
[PROOF STEP]
have "A1 Out X Y"
[PROOF STATE]
proof (prove)
using this:
Col A1 X Y

goal (1 subgoal):
 1. A1 Out X Y
[PROOF STEP]
using col_one_side_out W15 W16
[PROOF STATE]
proof (prove)
using this:
Col A1 X Y
\<lbrakk>Col ?A ?X ?Y; ?A ?B OS ?X ?Y\<rbrakk> \<Longrightarrow> ?A Out ?X ?Y
A1 A2 OS P X
A1 A2 OS P Y

goal (1 subgoal):
 1. A1 Out X Y
[PROOF STEP]
using one_side_symmetry one_side_transitivity
[PROOF STATE]
proof (prove)
using this:
Col A1 X Y
\<lbrakk>Col ?A ?X ?Y; ?A ?B OS ?X ?Y\<rbrakk> \<Longrightarrow> ?A Out ?X ?Y
A1 A2 OS P X
A1 A2 OS P Y
?P ?Q OS ?A ?B \<Longrightarrow> ?P ?Q OS ?B ?A
\<lbrakk>?P ?Q OS ?A ?B; ?P ?Q OS ?B ?C\<rbrakk> \<Longrightarrow> ?P ?Q OS ?A ?C

goal (1 subgoal):
 1. A1 Out X Y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A1 Out X Y

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A1 Out X Y
[PROOF STEP]
have "False"
[PROOF STATE]
proof (prove)
using this:
A1 Out X Y

goal (1 subgoal):
 1. False
[PROOF STEP]
using W12 not_bet_and_out
[PROOF STATE]
proof (prove)
using this:
A1 Out X Y
Bet P B X \<and> Bet P C Y \<and> Bet X A1 Y
\<not> (Bet ?A ?B ?C \<and> ?B Out ?A ?C)

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

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2 \<Longrightarrow> False

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2 \<Longrightarrow> False
[PROOF STEP]
have "Col C1 B1 B2 \<and> Col C2 B1 B2"
[PROOF STATE]
proof (prove)
using this:
\<not> Col C1 B1 B2 \<or> \<not> Col C2 B1 B2 \<Longrightarrow> False

goal (1 subgoal):
 1. Col C1 B1 B2 \<and> Col C2 B1 B2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Col C1 B1 B2 \<and> Col C2 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> Col ?P2 ?A1.2 ?A2.2 \<and> ?A1.2 ?A2.2 Par ?B1.2 ?B2.2 \<and> Col ?P2 ?B1.2 ?B2.2 \<and> ?A1.2 ?A2.2 Par ?C1.2 ?C2.2 \<and> Col ?P2 ?C1.2 ?C2.2 \<Longrightarrow> Col ?C1.2 ?B1.2 ?B2.2 \<and> Col ?C2.2 ?B1.2 ?B2.2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<not> Col ?P2 ?A1.2 ?A2.2 \<and> ?A1.2 ?A2.2 Par ?B1.2 ?B2.2 \<and> Col ?P2 ?B1.2 ?B2.2 \<and> ?A1.2 ?A2.2 Par ?C1.2 ?C2.2 \<and> Col ?P2 ?C1.2 ?C2.2 \<Longrightarrow> Col ?C1.2 ?B1.2 ?B2.2 \<and> Col ?C2.2 ?B1.2 ?B2.2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
fix A1 A2 B1 B2 P C1 C2
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
assume P1: "Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2"
[PROOF STATE]
proof (state)
this:
Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have "Col C1 B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col C1 B1 B2
[PROOF STEP]
by (smt P1 l9_10 not_col_permutation_3 not_strict_par2 par_col2_par par_comm par_id_5 par_symmetry ts_distincts)
[PROOF STATE]
proof (state)
this:
Col C1 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Col C1 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
have "Col C2 B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col C2 B1 B2
[PROOF STEP]
by (smt P1 l9_10 not_col_permutation_3 not_strict_par2 par_col2_par par_id_5 par_left_comm par_symmetry ts_distincts)
[PROOF STATE]
proof (state)
this:
Col C2 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Col C1 B1 B2
Col C2 B1 B2
[PROOF STEP]
have "Col C1 B1 B2 \<and> Col C2 B1 B2"
[PROOF STATE]
proof (prove)
using this:
Col C1 B1 B2
Col C2 B1 B2

goal (1 subgoal):
 1. Col C1 B1 B2 \<and> Col C2 B1 B2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Col C1 B1 B2 \<and> Col C2 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Col ?P2 ?A1.2 ?A2.2 \<and> ?A1.2 ?A2.2 Par ?B1.2 ?B2.2 \<and> Col ?P2 ?B1.2 ?B2.2 \<and> ?A1.2 ?A2.2 Par ?C1.2 ?C2.2 \<and> Col ?P2 ?C1.2 ?C2.2 \<Longrightarrow> Col ?C1.2 ?B1.2 ?B2.2 \<and> Col ?C2.2 ?B1.2 ?B2.2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col ?P2 ?A1.2 ?A2.2 \<and> ?A1.2 ?A2.2 Par ?B1.2 ?B2.2 \<and> Col ?P2 ?B1.2 ?B2.2 \<and> ?A1.2 ?A2.2 Par ?C1.2 ?C2.2 \<and> Col ?P2 ?C1.2 ?C2.2 \<Longrightarrow> Col ?C1.2 ?B1.2 ?B2.2 \<and> Col ?C2.2 ?B1.2 ?B2.2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Col ?P2 ?A1.2 ?A2.2 \<and> ?A1.2 ?A2.2 Par ?B1.2 ?B2.2 \<and> Col ?P2 ?B1.2 ?B2.2 \<and> ?A1.2 ?A2.2 Par ?C1.2 ?C2.2 \<and> Col ?P2 ?C1.2 ?C2.2 \<Longrightarrow> Col ?C1.2 ?B1.2 ?B2.2 \<and> Col ?C2.2 ?B1.2 ?B2.2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
using playfair_s_postulate_def
[PROOF STATE]
proof (prove)
using this:
Col ?P2 ?A1.2 ?A2.2 \<and> ?A1.2 ?A2.2 Par ?B1.2 ?B2.2 \<and> Col ?P2 ?B1.2 ?B2.2 \<and> ?A1.2 ?A2.2 Par ?C1.2 ?C2.2 \<and> Col ?P2 ?C1.2 ?C2.2 \<Longrightarrow> Col ?C1.2 ?B1.2 ?B2.2 \<and> Col ?C2.2 ?B1.2 ?B2.2
PlayfairSPostulate \<equiv> \<forall>A1 A2 B1 B2 C1 C2 P. A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2 \<longrightarrow> Col C1 B1 B2 \<and> Col C2 B1 B2

goal (1 subgoal):
 1. PlayfairSPostulate
[PROOF STEP]
by (metis \<open>\<And>P C2 C1 B2 B1 A2 A1. \<not> Col P A1 A2 \<and> A1 A2 Par B1 B2 \<and> Col P B1 B2 \<and> A1 A2 Par C1 C2 \<and> Col P C1 C2 \<Longrightarrow> Col C1 B1 B2 \<and> Col C2 B1 B2\<close>)
[PROOF STATE]
proof (state)
this:
PlayfairSPostulate

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  fun_tuple_to_univ_poly_closed:
  assumes "is_function_tuple R n fs"
  assumes "x \<in> carrier (R\<^bsup>n\<^esup>)"
  assumes "length fs = Suc m"
  shows "fun_tuple_to_univ_poly R n m fs x \<in> carrier (UP R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fun_tuple_to_univ_poly R n m fs x \<in> carrier (UP R)
[PROOF STEP]
unfolding fun_tuple_to_univ_poly_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ring_cfs_to_univ_poly m (function_tuple_eval R n fs x) \<in> carrier (UP R)
[PROOF STEP]
using assms
        ring_cfs_to_univ_poly_closed[of "function_tuple_eval R n fs x" m]
        function_tuple_eval_closed[of R n fs x]
[PROOF STATE]
proof (prove)
using this:
is_function_tuple R n fs
x \<in> carrier (R\<^bsup>n\<^esup>)
length fs = Suc m
function_tuple_eval R n fs x \<in> carrier (R\<^bsup>Suc m\<^esup>) \<Longrightarrow> ring_cfs_to_univ_poly m (function_tuple_eval R n fs x) \<in> carrier (UP R)
\<lbrakk>is_function_tuple R n fs; x \<in> carrier (R\<^bsup>n\<^esup>)\<rbrakk> \<Longrightarrow> function_tuple_eval R n fs x \<in> carrier (R\<^bsup>length fs\<^esup>)

goal (1 subgoal):
 1. ring_cfs_to_univ_poly m (function_tuple_eval R n fs x) \<in> carrier (UP R)
[PROOF STEP]
by metis


[STATEMENT]
lemma (in prob_space) uniform_distributed_iff:
  fixes a b :: real
  shows "distributed M lborel X (\<lambda>x. indicator {a..b} x / measure lborel {a..b}) \<longleftrightarrow>
    (X \<in> borel_measurable M \<and> a < b \<and> (\<forall>t\<in>{a .. b}. \<P>(x in M. X x \<le> t)= (t - a) / (b - a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distributed M lborel X (\<lambda>x. ennreal (indicat_real {a..b} x / content {a..b})) = (random_variable borel X \<and> a < b \<and> (\<forall>t\<in>{a..b}. prob {x \<in> space M. X x \<le> t} = (t - a) / (b - a)))
[PROOF STEP]
using
    uniform_distributed_bounds[of X a b]
    uniform_distributed_measure[of X a b]
    distributed_measurable[of M lborel X]
[PROOF STATE]
proof (prove)
using this:
distributed M lborel X (\<lambda>x. ennreal (indicat_real {a..b} x / content {a..b})) \<Longrightarrow> a < b
\<lbrakk>distributed M lborel X (\<lambda>x. ennreal (indicat_real {a..b} x / content {a..b})); a \<le> ?t; ?t \<le> b\<rbrakk> \<Longrightarrow> prob {x \<in> space M. X x \<le> ?t} = (?t - a) / (b - a)
distributed M lborel X ?f \<Longrightarrow> random_variable lborel X

goal (1 subgoal):
 1. distributed M lborel X (\<lambda>x. ennreal (indicat_real {a..b} x / content {a..b})) = (random_variable borel X \<and> a < b \<and> (\<forall>t\<in>{a..b}. prob {x \<in> space M. X x \<le> t} = (t - a) / (b - a)))
[PROOF STEP]
by (auto intro!: uniform_distrI_borel_atLeastAtMost simp del: content_real_if)


[STATEMENT]
lemma sets_in_extensional_aux:
  "{x\<in>space (PiM I M). x \<in> extensional I} \<in> sets (PiM I M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} \<in> sets (Pi\<^sub>M I M)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} \<in> sets (Pi\<^sub>M I M)
[PROOF STEP]
have "{x\<in>space (PiM I M). x \<in> extensional I} = space (PiM I M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} = space (Pi\<^sub>M I M)
[PROOF STEP]
by (auto simp add: extensional_def space_PiM)
[PROOF STATE]
proof (state)
this:
{x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} = space (Pi\<^sub>M I M)

goal (1 subgoal):
 1. {x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} \<in> sets (Pi\<^sub>M I M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} = space (Pi\<^sub>M I M)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} = space (Pi\<^sub>M I M)

goal (1 subgoal):
 1. {x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} \<in> sets (Pi\<^sub>M I M)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
{x \<in> space (Pi\<^sub>M I M). x \<in> extensional I} \<in> sets (Pi\<^sub>M I M)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma K2_isometry_inverse_inv [simp]:
  assumes "is_K2_isometry J"
  shows "inv\<^bsub>(|carrier = Collect is_K2_isometry, mult = cltn2_compose, one = cltn2_id|)\<^esub> J
  = cltn2_inverse J"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv\<^bsub>\<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>\<^esub> J = cltn2_inverse J
[PROOF STEP]
using cltn2_left_inverse
    and \<open>is_K2_isometry J\<close>
    and cltn2_inverse_is_K2_isometry
    and K2_isometry.inv_equality
[PROOF STATE]
proof (prove)
using this:
cltn2_compose (cltn2_inverse ?A) ?A = cltn2_id
is_K2_isometry J
is_K2_isometry ?J \<Longrightarrow> is_K2_isometry (cltn2_inverse ?J)
\<lbrakk>?y \<otimes>\<^bsub>\<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>\<^esub> ?x = \<one>\<^bsub>\<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>\<^esub>; ?x \<in> carrier \<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>; ?y \<in> carrier \<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>\<rbrakk> \<Longrightarrow> inv\<^bsub>\<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>\<^esub> ?x = ?y

goal (1 subgoal):
 1. inv\<^bsub>\<lparr>carrier = Collect is_K2_isometry, monoid.mult = cltn2_compose, one = cltn2_id\<rparr>\<^esub> J = cltn2_inverse J
[PROOF STEP]
by simp


[STATEMENT]
lemma le_imp_inv:
  assumes "a \<le> b"
  shows "b = a + (b - a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b = a + (b - a)
[PROOF STEP]
using le_imp_add[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<exists>c. b = a + c

goal (1 subgoal):
 1. b = a + (b - a)
[PROOF STEP]
by auto


[STATEMENT]
lemma mset_swap: "i < length xs \<Longrightarrow> j < length xs \<Longrightarrow> mset (swap xs i j) = mset xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < length xs; j < length xs\<rbrakk> \<Longrightarrow> mset (swap xs i j) = mset xs
[PROOF STEP]
by (simp add: mset_update swap_def nth_list_update)


[STATEMENT]
lemma uminus_epi_iff:
  fixes f :: "'a::complete_boolean_algebra_alt_with_dual \<Rightarrow> 'b::complete_boolean_algebra_alt_with_dual"
  shows "(f \<circ> \<partial> = g \<circ> \<partial>) = (f = g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<circ> \<partial> = g \<circ> \<partial>) = (f = g)
[PROOF STEP]
using uminus_galois_var2
[PROOF STATE]
proof (prove)
using this:
(?f \<circ> \<partial> = ?g) = (?g \<circ> \<partial> = ?f)

goal (1 subgoal):
 1. (f \<circ> \<partial> = g \<circ> \<partial>) = (f = g)
[PROOF STEP]
by force


[STATEMENT]
lemma star_n_inverse: "inverse (star_n X) = star_n (\<lambda>n. inverse (X n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (star_n X) = star_n (\<lambda>n. inverse (X n))
[PROOF STEP]
by (simp only: star_inverse_def starfun_star_n)


[STATEMENT]
lemma rbt_lookup_rbt_delete:
  assumes is_rbt: "is_rbt t"
  shows "rbt_lookup (rbt_delete k t) = (rbt_lookup t)|`(-{k})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_lookup (rbt_delete k t) = rbt_lookup t |` (- {k})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
show "rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (-{k})) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
proof (cases "x = k")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
 2. x \<noteq> k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
assume "x = k"
[PROOF STATE]
proof (state)
this:
x = k

goal (2 subgoals):
 1. x = k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
 2. x \<noteq> k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
with is_rbt
[PROOF STATE]
proof (chain)
picking this:
is_rbt t
x = k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
is_rbt t
x = k

goal (1 subgoal):
 1. rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
by (cases "rbt_lookup (rbt_delete k t) k") (auto simp: rbt_lookup_in_tree rbt_delete_in_tree)
[PROOF STATE]
proof (state)
this:
rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x

goal (1 subgoal):
 1. x \<noteq> k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
assume "x \<noteq> k"
[PROOF STATE]
proof (state)
this:
x \<noteq> k

goal (1 subgoal):
 1. x \<noteq> k \<Longrightarrow> rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<noteq> k

goal (1 subgoal):
 1. rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x
[PROOF STEP]
by auto (metis is_rbt rbt_delete_is_rbt rbt_delete_in_tree is_rbt_rbt_sorted rbt_lookup_from_in_tree)
[PROOF STATE]
proof (state)
this:
rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rbt_lookup (rbt_delete k t) x = (rbt_lookup t |` (- {k})) x

goal:
No subgoals!
[PROOF STEP]
qed