[STATEMENT]
lemma segment_construction:
  assumes "x \<in> unit_disc" and "y \<in> unit_disc"
  assumes "a \<in> unit_disc" and "b \<in> unit_disc"
  shows "\<exists> z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
obtain d where d: "d = poincare_distance a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>d. d = poincare_distance a b \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
d = poincare_distance a b

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
have "d \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> unit_disc
y \<in> unit_disc
a \<in> unit_disc
b \<in> unit_disc

goal (1 subgoal):
 1. 0 \<le> d
[PROOF STEP]
by (simp add: d poincare_distance_ge0)
[PROOF STATE]
proof (state)
this:
0 \<le> d

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
have "\<exists> z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d" (is "?P x y")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
proof (cases "x = y")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
 2. x \<noteq> y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = y

goal (2 subgoals):
 1. x = y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
 2. x \<noteq> y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
have "\<exists> z. z \<in> unit_disc \<and> poincare_distance x z = d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_distance x z = d
[PROOF STEP]
proof (rule wlog_zero)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. x \<in> unit_disc
 2. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
 3. \<exists>z. z \<in> unit_disc \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
show "\<exists> z. z \<in> unit_disc \<and> poincare_distance 0\<^sub>h z = d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
using ex_x_axis_poincare_distance_negative[of d] \<open>d \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 \<le> d \<Longrightarrow> \<exists>z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> of_complex z \<in> unit_disc \<and> of_complex z \<in> circline_set x_axis \<and> poincare_distance 0\<^sub>h (of_complex z) = d
0 \<le> d

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance 0\<^sub>h z = d

goal (2 subgoals):
 1. x \<in> unit_disc
 2. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x \<in> unit_disc
 2. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
show "x \<in> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> unit_disc
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
x \<in> unit_disc

goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
fix a u
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
assume "u \<in> unit_disc" "cmod a < 1"
[PROOF STATE]
proof (state)
this:
u \<in> unit_disc
cmod a < 1

goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
assume "\<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d"
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d

goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d
[PROOF STEP]
obtain z where *: "z \<in> unit_disc" "poincare_distance (moebius_pt (blaschke a) u) z = d"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> unit_disc; poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> unit_disc
poincare_distance (moebius_pt (blaschke a) u) z = d

goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
obtain z' where z': "z = moebius_pt (blaschke a) z'" "z' \<in> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt (blaschke a) z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>z \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc

goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt (blaschke a) z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using unit_disc_fix_iff[of "blaschke a"] \<open>cmod a < 1\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc
unit_disc_fix (blaschke a) \<Longrightarrow> moebius_pt (blaschke a) ` unit_disc = unit_disc
cmod a < 1

goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt (blaschke a) z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using blaschke_unit_disc_fix[of a]
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc
unit_disc_fix (blaschke a) \<Longrightarrow> moebius_pt (blaschke a) ` unit_disc = unit_disc
cmod a < 1
cmod a < 1 \<Longrightarrow> unit_disc_fix (blaschke a)

goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt (blaschke a) z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z = moebius_pt (blaschke a) z'
z' \<in> unit_disc

goal (1 subgoal):
 1. \<And>a u. \<lbrakk>u \<in> unit_disc; cmod a < 1; \<exists>z. z \<in> unit_disc \<and> poincare_distance (moebius_pt (blaschke a) u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
show "\<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
using * z' \<open>u : unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc
poincare_distance (moebius_pt (blaschke a) u) z = d
z = moebius_pt (blaschke a) z'
z' \<in> unit_disc
u \<in> unit_disc

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
using blaschke_unit_disc_fix[of a] \<open>cmod a < 1\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc
poincare_distance (moebius_pt (blaschke a) u) z = d
z = moebius_pt (blaschke a) z'
z' \<in> unit_disc
u \<in> unit_disc
cmod a < 1 \<Longrightarrow> unit_disc_fix (blaschke a)
cmod a < 1

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d
[PROOF STEP]
by (rule_tac x=z' in exI, simp)
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance u z = d

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance x z = d

goal (2 subgoals):
 1. x = y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
 2. x \<noteq> y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance x z = d

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
using \<open>x = y\<close>
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance x z = d
x = y

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
unfolding poincare_between_def
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_distance x z = d
x = y

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> (x = y \<or> y = z \<or> (let cr = cross_ratio x y z (inversion y) in is_real (to_complex cr) \<and> Re (to_complex cr) < 0)) \<and> poincare_distance y z = d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> y

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
[PROOF STEP]
proof (rule wlog_positive_x_axis[where P="\<lambda> y x. ?P x y"])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
 5. \<And>x. \<lbrakk>is_real x; 0 < Re x; Re x < 1\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
 5. \<And>x. \<lbrakk>is_real x; 0 < Re x; Re x < 1\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
assume "is_real x" "0 < Re x" "Re x < 1"
[PROOF STATE]
proof (state)
this:
is_real x
0 < Re x
Re x < 1

goal (5 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
 5. \<And>x. \<lbrakk>is_real x; 0 < Re x; Re x < 1\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
is_real x
0 < Re x
Re x < 1
[PROOF STEP]
obtain z where z: "is_real z" "Re z \<le> 0" "- 1 < Re z" "of_complex z \<in> unit_disc"
        "of_complex z \<in> unit_disc" "of_complex z \<in> circline_set x_axis" "poincare_distance 0\<^sub>h (of_complex z) = d"
[PROOF STATE]
proof (prove)
using this:
is_real x
0 < Re x
Re x < 1

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>is_real z; Re z \<le> 0; - 1 < Re z; of_complex z \<in> unit_disc; of_complex z \<in> unit_disc; of_complex z \<in> circline_set x_axis; poincare_distance 0\<^sub>h (of_complex z) = d\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ex_x_axis_poincare_distance_negative[of d] \<open>d \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
is_real x
0 < Re x
Re x < 1
0 \<le> d \<Longrightarrow> \<exists>z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> of_complex z \<in> unit_disc \<and> of_complex z \<in> circline_set x_axis \<and> poincare_distance 0\<^sub>h (of_complex z) = d
0 \<le> d

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>is_real z; Re z \<le> 0; - 1 < Re z; of_complex z \<in> unit_disc; of_complex z \<in> unit_disc; of_complex z \<in> circline_set x_axis; poincare_distance 0\<^sub>h (of_complex z) = d\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_real z
Re z \<le> 0
- 1 < Re z
of_complex z \<in> unit_disc
of_complex z \<in> unit_disc
of_complex z \<in> circline_set x_axis
poincare_distance 0\<^sub>h (of_complex z) = d

goal (5 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
 5. \<And>x. \<lbrakk>is_real x; 0 < Re x; Re x < 1\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
have "poincare_between (of_complex x) 0\<^sub>h (of_complex z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
proof (cases "z = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z = 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
 2. z \<noteq> 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
z = 0

goal (2 subgoals):
 1. z = 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
 2. z \<noteq> 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
z = 0

goal (1 subgoal):
 1. poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
unfolding poincare_between_def
[PROOF STATE]
proof (prove)
using this:
z = 0

goal (1 subgoal):
 1. of_complex x = 0\<^sub>h \<or> 0\<^sub>h = of_complex z \<or> (let cr = cross_ratio (of_complex x) 0\<^sub>h (of_complex z) (inversion 0\<^sub>h) in is_real (to_complex cr) \<and> Re (to_complex cr) < 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
poincare_between (of_complex x) 0\<^sub>h (of_complex z)

goal (1 subgoal):
 1. z \<noteq> 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z \<noteq> 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
z \<noteq> 0

goal (1 subgoal):
 1. z \<noteq> 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
have "x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> 0
[PROOF STEP]
using \<open>is_real x\<close> \<open>Re x > 0\<close>
[PROOF STATE]
proof (prove)
using this:
is_real x
0 < Re x

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

goal (1 subgoal):
 1. z \<noteq> 0 \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0

goal (1 subgoal):
 1. poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
using poincare_between_x_axis_u0v[of x z]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0
\<lbrakk>is_real x; x \<noteq> 0; z \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z) = (is_real z \<and> Re x * Re z < 0)

goal (1 subgoal):
 1. poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
using z \<open>is_real x\<close> \<open>x \<noteq> 0\<close> \<open>Re x > 0\<close> False
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0
\<lbrakk>is_real x; x \<noteq> 0; z \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z) = (is_real z \<and> Re x * Re z < 0)
is_real z
Re z \<le> 0
- 1 < Re z
of_complex z \<in> unit_disc
of_complex z \<in> unit_disc
of_complex z \<in> circline_set x_axis
poincare_distance 0\<^sub>h (of_complex z) = d
is_real x
x \<noteq> 0
0 < Re x
z \<noteq> 0

goal (1 subgoal):
 1. poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
using complex_eq_if_Re_eq mult_pos_neg
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0
\<lbrakk>is_real x; x \<noteq> 0; z \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_between (of_complex x) 0\<^sub>h (of_complex z) = (is_real z \<and> Re x * Re z < 0)
is_real z
Re z \<le> 0
- 1 < Re z
of_complex z \<in> unit_disc
of_complex z \<in> unit_disc
of_complex z \<in> circline_set x_axis
poincare_distance 0\<^sub>h (of_complex z) = d
is_real x
x \<noteq> 0
0 < Re x
z \<noteq> 0
\<lbrakk>is_real ?z1.0; is_real ?z2.0\<rbrakk> \<Longrightarrow> (?z1.0 = ?z2.0) = (Re ?z1.0 = Re ?z2.0)
\<lbrakk>(0::?'a) < ?a; ?b < (0::?'a)\<rbrakk> \<Longrightarrow> ?a * ?b < (0::?'a)

goal (1 subgoal):
 1. poincare_between (of_complex x) 0\<^sub>h (of_complex z)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
poincare_between (of_complex x) 0\<^sub>h (of_complex z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
poincare_between (of_complex x) 0\<^sub>h (of_complex z)

goal (5 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
 5. \<And>x. \<lbrakk>is_real x; 0 < Re x; Re x < 1\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
thus "?P (of_complex x) 0\<^sub>h"
[PROOF STATE]
proof (prove)
using this:
poincare_between (of_complex x) 0\<^sub>h (of_complex z)

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
using \<open>poincare_distance 0\<^sub>h (of_complex z) = d\<close> \<open>of_complex z \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_between (of_complex x) 0\<^sub>h (of_complex z)
poincare_distance 0\<^sub>h (of_complex z) = d
of_complex z \<in> unit_disc

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between (of_complex x) 0\<^sub>h z \<and> poincare_distance 0\<^sub>h z = d

goal (4 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. y \<in> unit_disc
 2. x \<in> unit_disc
 3. y \<noteq> x
 4. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
show "x \<in> unit_disc" "y \<in> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> unit_disc &&& y \<in> unit_disc
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
x \<in> unit_disc
y \<in> unit_disc

goal (2 subgoals):
 1. y \<noteq> x
 2. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. y \<noteq> x
 2. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
show "y \<noteq> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<noteq> x
[PROOF STEP]
using \<open>x \<noteq> y\<close>
[PROOF STATE]
proof (prove)
using this:
x \<noteq> y

goal (1 subgoal):
 1. y \<noteq> x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y \<noteq> x

goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
fix M u v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
assume "unit_disc_fix M" "u \<in> unit_disc" "v \<in> unit_disc" "u \<noteq> v"
[PROOF STATE]
proof (state)
this:
unit_disc_fix M
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v

goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
assume "?P (moebius_pt M v) (moebius_pt M u)"
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d

goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d
[PROOF STEP]
obtain z where *: "z \<in> unit_disc" "poincare_between (moebius_pt M v) (moebius_pt M u) z" "poincare_distance (moebius_pt M u) z = d"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> unit_disc; poincare_between (moebius_pt M v) (moebius_pt M u) z; poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> unit_disc
poincare_between (moebius_pt M v) (moebius_pt M u) z
poincare_distance (moebius_pt M u) z = d

goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
obtain z' where z': "z = moebius_pt M z'" "z' \<in> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt M z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>z \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc

goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt M z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using unit_disc_fix_iff[of M] \<open>unit_disc_fix M\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> unit_disc
unit_disc_fix M \<Longrightarrow> moebius_pt M ` unit_disc = unit_disc
unit_disc_fix M

goal (1 subgoal):
 1. (\<And>z'. \<lbrakk>z = moebius_pt M z'; z' \<in> unit_disc\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z = moebius_pt M z'
z' \<in> unit_disc

goal (1 subgoal):
 1. \<And>M u v. \<lbrakk>unit_disc_fix M; u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; \<exists>z. z \<in> unit_disc \<and> poincare_between (moebius_pt M v) (moebius_pt M u) z \<and> poincare_distance (moebius_pt M u) z = d\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
thus "?P v u"
[PROOF STATE]
proof (prove)
using this:
z = moebius_pt M z'
z' \<in> unit_disc

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
using * \<open>u \<in> unit_disc\<close> \<open>v \<in> unit_disc\<close> \<open>unit_disc_fix M\<close>
[PROOF STATE]
proof (prove)
using this:
z = moebius_pt M z'
z' \<in> unit_disc
z \<in> unit_disc
poincare_between (moebius_pt M v) (moebius_pt M u) z
poincare_distance (moebius_pt M u) z = d
u \<in> unit_disc
v \<in> unit_disc
unit_disc_fix M

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between v u z \<and> poincare_distance u z = d

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
using assms d
[PROOF STATE]
proof (prove)
using this:
\<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = d
x \<in> unit_disc
y \<in> unit_disc
a \<in> unit_disc
b \<in> unit_disc
d = poincare_distance a b

goal (1 subgoal):
 1. \<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>z. z \<in> unit_disc \<and> poincare_between x y z \<and> poincare_distance y z = poincare_distance a b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subspace_span [iff]: "subspace (span S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subspace (span S)
[PROOF STEP]
by (auto simp: subspace_def span_zero span_add span_scale)


[STATEMENT]
lemma distinct_insort_key:
  "distinct (map f (insort_key f x xs)) = (f x \<notin> f ` set xs \<and> (distinct (map f xs)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map f (insort_key f x xs)) = (f x \<notin> f ` set xs \<and> distinct (map f xs))
[PROOF STEP]
by (induct xs) (auto simp: set_insort_key)


[STATEMENT]
lemma x_gt_inf[simp]:"\<infinity> \<le> x \<Longrightarrow> x = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<infinity> \<le> x \<Longrightarrow> x = \<infinity>
[PROOF STEP]
apply (cut_tac inf_ge_any[of "x"],
       rule ale_antisym[of "x" "\<infinity>"], assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Suc_le_imp_le_pred: "Suc m \<le> n \<Longrightarrow> m \<le> n - Suc 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc m \<le> n \<Longrightarrow> m \<le> n - Suc 0
[PROOF STEP]
by simp


[STATEMENT]
lemma iTrigger_iSince_conv: "(P t'. t' \<T> t I. Q t) = ((\<box> t I. Q t) \<or> (Q t'. t' \<S> t I. (Q t \<and> P t)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P t'. t' \<T> t I. Q t) = ((\<box> t I. Q t) \<or> (Q t'. t' \<S> t I. Q t \<and> P t))
[PROOF STEP]
by (fastforce simp: iTrigger_iWeakSince_conv iWeakSince_iSince_conv)


[STATEMENT]
lemma run_rel_consistent: "(ra, rb) \<in> run_rel R \<Longrightarrow> a.L o ra = b.L o rb"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ra, rb) \<in> run_rel R \<Longrightarrow> a.L \<circ> ra = b.L \<circ> rb
[PROOF STEP]
using labeling_consistent
[PROOF STATE]
proof (prove)
using this:
(?a, ?b) \<in> R \<Longrightarrow> a.L ?a = b.L ?b

goal (1 subgoal):
 1. (ra, rb) \<in> run_rel R \<Longrightarrow> a.L \<circ> ra = b.L \<circ> rb
[PROOF STEP]
unfolding run_rel_def
[PROOF STATE]
proof (prove)
using this:
(?a, ?b) \<in> R \<Longrightarrow> a.L ?a = b.L ?b

goal (1 subgoal):
 1. (ra, rb) \<in> {(ra, rb). \<forall>i. (ra i, rb i) \<in> R} \<Longrightarrow> a.L \<circ> ra = b.L \<circ> rb
[PROOF STEP]
by auto


[STATEMENT]
lemma noner_sings_conv: "(\<forall> w. w = \<epsilon> \<longleftrightarrow> f w = \<epsilon>) \<longleftrightarrow> (\<forall> a. f [a] \<noteq> \<epsilon>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>w. (w = \<epsilon>) = (f w = \<epsilon>)) = (\<forall>a. f [a] \<noteq> \<epsilon>)
[PROOF STEP]
by (rule, blast)
   (metis Nil_is_append_conv emp_to_emp' hd_tlE pop_hd)


[STATEMENT]
lemma gen_analz_insert_eq:
  "\<lbrakk> X \<in> analz G; G \<subseteq> H \<rbrakk> \<Longrightarrow> analz (insert X H) = analz H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<in> analz G; G \<subseteq> H\<rbrakk> \<Longrightarrow> analz (insert X H) = analz H
[PROOF STEP]
by (blast intro: analz_cut analz_insertI analz_monotone)


[STATEMENT]
lemma inA_is_sorted: "xs \<in> A \<Longrightarrow> sorted (rev xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs \<in> A \<Longrightarrow> Sorted_Less.sorted (rev xs)
[PROOF STEP]
by (auto simp add:A_def sorted_less_sorted_list_of_set)


[STATEMENT]
lemma generate_valid_topology_subseteq_edges:
      "edges (generate_valid_topology M G) \<subseteq> (edges G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. edges (generate_valid_topology M G) \<subseteq> edges G
[PROOF STEP]
proof(induction M arbitrary: G)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>G. edges (generate_valid_topology [] G) \<subseteq> edges G
 2. \<And>a M G. (\<And>G. edges (generate_valid_topology M G) \<subseteq> edges G) \<Longrightarrow> edges (generate_valid_topology (a # M) G) \<subseteq> edges G
[PROOF STEP]
case Cons
[PROOF STATE]
proof (state)
this:
edges (generate_valid_topology M_ ?G) \<subseteq> edges ?G

goal (2 subgoals):
 1. \<And>G. edges (generate_valid_topology [] G) \<subseteq> edges G
 2. \<And>a M G. (\<And>G. edges (generate_valid_topology M G) \<subseteq> edges G) \<Longrightarrow> edges (generate_valid_topology (a # M) G) \<subseteq> edges G
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
edges (generate_valid_topology M_ ?G) \<subseteq> edges ?G

goal (1 subgoal):
 1. edges (generate_valid_topology (a_ # M_) G) \<subseteq> edges G
[PROOF STEP]
by (simp add: delete_edges_simp2) blast
[PROOF STATE]
proof (state)
this:
edges (generate_valid_topology (a_ # M_) G) \<subseteq> edges G

goal (1 subgoal):
 1. \<And>G. edges (generate_valid_topology [] G) \<subseteq> edges G
[PROOF STEP]
qed(simp)


[STATEMENT]
lemma unique_factorization_m_alt_def: "unique_factorization_m f cfs = (factorization_m f cfs
  \<and> (\<forall> dgs. factorization_m f dgs \<longrightarrow> Mf dgs = Mf cfs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unique_factorization_m f cfs = (factorization_m f cfs \<and> (\<forall>dgs. factorization_m f dgs \<longrightarrow> Mf dgs = Mf cfs))
[PROOF STEP]
using unique_factorization_m_imp_factorization[of f cfs]
[PROOF STATE]
proof (prove)
using this:
unique_factorization_m f cfs \<Longrightarrow> factorization_m f cfs

goal (1 subgoal):
 1. unique_factorization_m f cfs = (factorization_m f cfs \<and> (\<forall>dgs. factorization_m f dgs \<longrightarrow> Mf dgs = Mf cfs))
[PROOF STEP]
unfolding unique_factorization_m_def
[PROOF STATE]
proof (prove)
using this:
Mf ` Collect (factorization_m f) = {Mf cfs} \<Longrightarrow> factorization_m f cfs

goal (1 subgoal):
 1. (Mf ` Collect (factorization_m f) = {Mf cfs}) = (factorization_m f cfs \<and> (\<forall>dgs. factorization_m f dgs \<longrightarrow> Mf dgs = Mf cfs))
[PROOF STEP]
by auto


[STATEMENT]
lemma sH_g_evol[simp]:
  fixes \<phi> :: "('a::preorder) \<Rightarrow> 'b \<Rightarrow> 'b"
  shows "\<^bold>{P\<^bold>} (EVOL \<phi> G U) \<^bold>{Q\<^bold>} = (\<forall>s. P s \<longrightarrow> (\<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> Q (\<phi> t s)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>{P\<^bold>}EVOL \<phi> G U\<^bold>{Q\<^bold>} = (\<forall>s. P s \<longrightarrow> (\<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> Q (\<phi> t s)))
[PROOF STEP]
unfolding rel_kat_H g_evol_def g_orbit_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>s s'. P s \<longrightarrow> (s, s') \<in> {(s, s') |s s'. s' \<in> {\<phi> t s |t. t \<in> U s \<and> (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s))}} \<longrightarrow> Q s') = (\<forall>s. P s \<longrightarrow> (\<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> Q (\<phi> t s)))
[PROOF STEP]
by auto


[STATEMENT]
lemma inverse_neutral[simp]: "-\<^sub>o\<^sub>w 0\<^sub>o\<^sub>w = 0\<^sub>o\<^sub>w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. -\<^sub>o\<^sub>w 0\<^sub>o\<^sub>w = 0\<^sub>o\<^sub>w
[PROOF STEP]
by
    (
      rule inverse_unique[
        OF zero_closed zero_closed add.left_neutral_mow[OF zero_closed]
        ]
    )


[STATEMENT]
lemma convex_imp_contractible:
  fixes S :: "'a::real_normed_vector set"
  shows "convex S \<Longrightarrow> contractible S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex S \<Longrightarrow> contractible S
[PROOF STEP]
using contractible_empty convex_imp_starlike starlike_imp_contractible
[PROOF STATE]
proof (prove)
using this:
contractible {}
\<lbrakk>convex ?S; ?S \<noteq> {}\<rbrakk> \<Longrightarrow> starlike ?S
starlike ?S \<Longrightarrow> contractible ?S

goal (1 subgoal):
 1. convex S \<Longrightarrow> contractible S
[PROOF STEP]
by blast


[STATEMENT]
lemma Frct_mult: "Frct (a, numeral b) * Frct (c, numeral d) = Frct (a*c, numeral (b*d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Frct (a, numeral b) * Frct (c, numeral d) = Frct (a * c, numeral (b * d))
[PROOF STEP]
by simp


[STATEMENT]
lemma ext_hd_pvar:
  assumes "m > 0"
  shows "ext_hd m = (\<lambda>x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>). eval_at_point Q\<^sub>p x (pvar Q\<^sub>p 0) )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ext_hd m = (\<lambda>x\<in>carrier (Q\<^sub>p\<^bsup>m\<^esup>). eval_at_point Q\<^sub>p x (pvar Q\<^sub>p 0))
[PROOF STEP]
unfolding ext_hd_def restrict_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) then lead_coeff x else undefined) = (\<lambda>x. if x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) then eval_at_point Q\<^sub>p x (pvar Q\<^sub>p 0) else undefined)
[PROOF STEP]
using assms eval_pvar[of 0 m]
[PROOF STATE]
proof (prove)
using this:
0 < m
\<lbrakk>0 < m; ?a \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)\<rbrakk> \<Longrightarrow> eval_at_point Q\<^sub>p ?a (pvar Q\<^sub>p 0) = ?a ! 0

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) then lead_coeff x else undefined) = (\<lambda>x. if x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) then eval_at_point Q\<^sub>p x (pvar Q\<^sub>p 0) else undefined)
[PROOF STEP]
using hd_zeroth
[PROOF STATE]
proof (prove)
using this:
0 < m
\<lbrakk>0 < m; ?a \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)\<rbrakk> \<Longrightarrow> eval_at_point Q\<^sub>p ?a (pvar Q\<^sub>p 0) = ?a ! 0
0 < length ?x \<Longrightarrow> ?x ! 0 = lead_coeff ?x

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) then lead_coeff x else undefined) = (\<lambda>x. if x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) then eval_at_point Q\<^sub>p x (pvar Q\<^sub>p 0) else undefined)
[PROOF STEP]
by (metis (no_types, opaque_lifting) cartesian_power_car_memE)


[STATEMENT]
lemma not_modular_N5: "(\<not> class.modular_lattice inf ((\<le>)::'a \<Rightarrow> 'a \<Rightarrow> bool) (<) sup) =
   (\<exists> a b c::'a . N5_lattice a b c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> class.modular_lattice (\<sqinter>) (\<le>) (<) (\<squnion>)) = (\<exists>a b c. N5_lattice a b c)
[PROOF STEP]
apply (subgoal_tac "class.lattice (\<sqinter>) ((\<le>)::'a \<Rightarrow> 'a \<Rightarrow> bool) (<) sup")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>) \<Longrightarrow> (\<not> class.modular_lattice (\<sqinter>) (\<le>) (<) (\<squnion>)) = (\<exists>a b c. N5_lattice a b c)
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (unfold N5_lattice_def class.modular_lattice_def class.modular_lattice_axioms_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>) \<Longrightarrow> (\<not> (class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>) \<and> (\<forall>x y z. x \<le> y \<longrightarrow> x \<squnion> y \<sqinter> z = y \<sqinter> (x \<squnion> z)))) = (\<exists>a b c. a \<sqinter> c = b \<sqinter> c \<and> a < b \<and> a \<squnion> c = b \<squnion> c)
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>) \<Longrightarrow> (\<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))) = (\<exists>a b c. a \<sqinter> c = b \<sqinter> c \<and> a < b \<and> a \<squnion> c = b \<squnion> c)
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> \<exists>a b c. a \<sqinter> c = b \<sqinter> c \<and> a < b \<and> a \<squnion> c = b \<squnion> c
 2. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 3. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (subgoal_tac "x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> \<exists>a b c. a \<sqinter> c = b \<sqinter> c \<and> a < b \<and> a \<squnion> c = b \<squnion> c
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac x = "x \<squnion> y \<sqinter> z" in exI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> \<exists>b c. (x \<squnion> y \<sqinter> z) \<sqinter> c = b \<sqinter> c \<and> x \<squnion> y \<sqinter> z < b \<and> x \<squnion> y \<sqinter> z \<squnion> c = b \<squnion> c
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac x = "y \<sqinter> (x \<squnion> z)" in exI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> \<exists>c. (x \<squnion> y \<sqinter> z) \<sqinter> c = y \<sqinter> (x \<squnion> z) \<sqinter> c \<and> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z) \<and> x \<squnion> y \<sqinter> z \<squnion> c = y \<sqinter> (x \<squnion> z) \<squnion> c
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac x = z in exI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> (x \<squnion> y \<sqinter> z) \<sqinter> z = y \<sqinter> (x \<squnion> z) \<sqinter> z \<and> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z) \<and> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> (x \<squnion> y \<sqinter> z) \<sqinter> z = y \<sqinter> (x \<squnion> z) \<sqinter> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 4. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 5. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> (x \<squnion> y \<sqinter> z) \<sqinter> z \<le> y \<sqinter> (x \<squnion> z) \<sqinter> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<sqinter> z \<le> (x \<squnion> y \<sqinter> z) \<sqinter> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 4. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 5. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 6. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> (x \<squnion> y \<sqinter> z) \<sqinter> z \<le> y
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<sqinter> z \<le> (x \<squnion> y \<sqinter> z) \<sqinter> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 4. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 5. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 6. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac y = "x \<squnion> y \<sqinter> z" in order_trans)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> (x \<squnion> y \<sqinter> z) \<sqinter> z \<le> x \<squnion> y \<sqinter> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<le> y
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<sqinter> z \<le> (x \<squnion> y \<sqinter> z) \<sqinter> z
 4. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 5. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 6. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 7. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<sqinter> z \<le> x \<squnion> y \<sqinter> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 4. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 5. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac y = "y \<sqinter> z" in order_trans)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<sqinter> z \<le> y \<sqinter> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> z \<le> x \<squnion> y \<sqinter> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 4. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 5. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 6. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z = y \<sqinter> (x \<squnion> z) \<squnion> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<squnion> z \<le> y \<sqinter> (x \<squnion> z) \<squnion> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<squnion> z \<le> x \<squnion> y \<sqinter> z \<squnion> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 4. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 5. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<le> y \<sqinter> (x \<squnion> z) \<squnion> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<le> x \<squnion> y \<sqinter> z \<squnion> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 4. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 5. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac y = "y \<sqinter> (x \<squnion> z)" in order_trans)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<le> y \<sqinter> (x \<squnion> z)
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<le> y \<sqinter> (x \<squnion> z) \<squnion> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<le> x \<squnion> y \<sqinter> z \<squnion> z
 4. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 5. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 6. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<le> x \<squnion> y \<sqinter> z \<squnion> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac y = "x \<squnion> z" in order_trans)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> y \<sqinter> (x \<squnion> z) \<le> x \<squnion> z
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z); x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> z \<le> x \<squnion> y \<sqinter> z \<squnion> z
 3. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 4. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 5. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z < y \<sqinter> (x \<squnion> z)
 2. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 3. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule neq_le_trans)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)
 2. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<le> y \<sqinter> (x \<squnion> z)
 3. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 4. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x y z. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); x \<le> y; x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z)\<rbrakk> \<Longrightarrow> x \<squnion> y \<sqinter> z \<le> y \<sqinter> (x \<squnion> z)
 2. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 3. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>x y. x \<le> y \<and> (\<exists>z. x \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (x \<squnion> z))
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac x = a in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>y\<ge>a. \<exists>z. a \<squnion> y \<sqinter> z \<noteq> y \<sqinter> (a \<squnion> z)
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac x = b in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> a \<le> b \<and> (\<exists>z. a \<squnion> b \<sqinter> z \<noteq> b \<sqinter> (a \<squnion> z))
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> a \<le> b
 2. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>z. a \<squnion> b \<sqinter> z \<noteq> b \<sqinter> (a \<squnion> z)
 3. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (simp add: less_le)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> \<exists>z. a \<squnion> b \<sqinter> z \<noteq> b \<sqinter> (a \<squnion> z)
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (rule_tac x = c in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> a \<squnion> b \<sqinter> c \<noteq> b \<sqinter> (a \<squnion> c)
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a < b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> a \<squnion> b \<sqinter> c \<noteq> b
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (simp add: less_le)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<le> b \<and> a \<noteq> b; a \<squnion> c = b \<squnion> c\<rbrakk> \<Longrightarrow> a \<squnion> b \<sqinter> c \<noteq> b
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<squnion> c = b \<squnion> c; a \<le> b; a \<noteq> b; a \<squnion> b \<sqinter> c = b\<rbrakk> \<Longrightarrow> False
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (subgoal_tac "a \<squnion> a \<sqinter> c = b")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<squnion> c = b \<squnion> c; a \<le> b; a \<noteq> b; a \<squnion> b \<sqinter> c = b; a \<squnion> a \<sqinter> c = b\<rbrakk> \<Longrightarrow> False
 2. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<squnion> c = b \<squnion> c; a \<le> b; a \<noteq> b; a \<squnion> b \<sqinter> c = b\<rbrakk> \<Longrightarrow> a \<squnion> a \<sqinter> c = b
 3. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply (unfold sup_inf_absorb) [1]
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<squnion> c = b \<squnion> c; a \<le> b; a \<noteq> b; a \<squnion> b \<sqinter> c = b; a = b\<rbrakk> \<Longrightarrow> False
 2. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<squnion> c = b \<squnion> c; a \<le> b; a \<noteq> b; a \<squnion> b \<sqinter> c = b\<rbrakk> \<Longrightarrow> a \<squnion> a \<sqinter> c = b
 3. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b c. \<lbrakk>class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>); a \<sqinter> c = b \<sqinter> c; a \<squnion> c = b \<squnion> c; a \<le> b; a \<noteq> b; a \<squnion> b \<sqinter> c = b\<rbrakk> \<Longrightarrow> a \<squnion> a \<sqinter> c = b
 2. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.lattice (\<sqinter>) (\<le>) (<) (\<squnion>)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Arg_zero: "Arg 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Arg 0 = 0
[PROOF STEP]
by (simp add: Arg_def)


[STATEMENT]
lemma scene_inter_commute: "X \<sqinter>\<^sub>S Y = Y \<sqinter>\<^sub>S X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<sqinter>\<^sub>S Y = Y \<sqinter>\<^sub>S X
[PROOF STEP]
by (simp add: inf_scene_def scene_union_commute)


[STATEMENT]
lemma has_field_derivative_scaleR_deriv_right:
  assumes "f twice_field_differentiable_at z"
  shows "((\<lambda>x. k *\<^sub>R deriv f x) has_field_derivative k *\<^sub>R deriv (deriv f) z) (at z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. k *\<^sub>R deriv f x) has_field_derivative k *\<^sub>R deriv (deriv f) z) (at z)
[PROOF STEP]
by (simp add: DERIV_deriv_iff_field_differentiable assms deriv_field_differentiable_at has_field_derivative_scaleR_right)


[STATEMENT]
lemma (in prob_space) expectation_condition_card_2:
  fixes X::"'a set" and \<beta>::real and \<alpha>::real and f:: "'a \<Rightarrow> real"
  assumes "finite X"  and "\<And> x. x \<in> X \<Longrightarrow> f x \<le> 1" and "\<beta> > 0" and "\<alpha> > 0"
  and "expectation f \<ge> 1 - \<alpha>" and "M = uniform_count_measure X"
  shows "card {x \<in> X. f x \<ge> 1 - \<beta>} \<ge> (1- \<alpha> / \<beta>) * card X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have hcard: "card {x \<in> X. 1 - \<beta> \<le> f x} \<le> card X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {x \<in> X. 1 - \<beta> \<le> f x} \<le> card X
[PROOF STEP]
using card_mono assms(1)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?B; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> card ?A \<le> card ?B
finite X

goal (1 subgoal):
 1. card {x \<in> X. 1 - \<beta> \<le> f x} \<le> card X
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
card {x \<in> X. 1 - \<beta> \<le> f x} \<le> card X

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have h\<beta>: "\<forall> x \<in> X- {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)}. f x \<le> 1 - \<beta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. f x \<le> 1 - \<beta>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. f x \<le> 1 - \<beta>

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have "expectation f * card X = (\<Sum> x \<in> X. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. expectation f * real (card X) = sum f X
[PROOF STEP]
using assms(1) expectation_uniform_count assms(6)
[PROOF STATE]
proof (prove)
using this:
finite X
\<lbrakk>M = uniform_count_measure ?X; finite ?X\<rbrakk> \<Longrightarrow> expectation ?f = sum ?f ?X / real (card ?X)
M = uniform_count_measure X

goal (1 subgoal):
 1. expectation f * real (card X) = sum f X
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
expectation f * real (card X) = sum f X

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
expectation f * real (card X) = sum f X
[PROOF STEP]
have "(1 - \<alpha>) * card X \<le> (\<Sum> x \<in> X. f x)"
[PROOF STATE]
proof (prove)
using this:
expectation f * real (card X) = sum f X

goal (1 subgoal):
 1. (1 - \<alpha>) * real (card X) \<le> sum f X
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
expectation f * real (card X) = sum f X
finite X
?x12 \<in> X \<Longrightarrow> f ?x12 \<le> 1
0 < \<beta>
0 < \<alpha>
1 - \<alpha> \<le> expectation f
M = uniform_count_measure X

goal (1 subgoal):
 1. (1 - \<alpha>) * real (card X) \<le> sum f X
[PROOF STEP]
by (metis mult.commute sum_bounded_below sum_constant)
[PROOF STATE]
proof (state)
this:
(1 - \<alpha>) * real (card X) \<le> sum f X

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1 - \<alpha>) * real (card X) \<le> sum f X

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have "... = (\<Sum> x \<in> {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)}. f x) +
 (\<Sum> x \<in> X - {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)}. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f X = (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite X
?x12 \<in> X \<Longrightarrow> f ?x12 \<le> 1
0 < \<beta>
0 < \<alpha>
1 - \<alpha> \<le> expectation f
M = uniform_count_measure X

goal (1 subgoal):
 1. sum f X = (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
by (metis (no_types, lifting) add.commute mem_Collect_eq subsetI sum.subset_diff)
[PROOF STATE]
proof (state)
this:
sum f X = (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x})

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum f X = (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x})

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have "... \<le>  (\<Sum> x \<in> {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)}. 1) +
 (\<Sum> x \<in> X - {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)}. (1 - \<beta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x}) \<le> (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>)
[PROOF STEP]
using assms h\<beta> sum_mono
[PROOF STATE]
proof (prove)
using this:
finite X
?x12 \<in> X \<Longrightarrow> f ?x12 \<le> 1
0 < \<beta>
0 < \<alpha>
1 - \<alpha> \<le> expectation f
M = uniform_count_measure X
\<forall>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. f x \<le> 1 - \<beta>
(\<And>i. i \<in> ?K \<Longrightarrow> ?f i \<le> ?g i) \<Longrightarrow> sum ?f ?K \<le> sum ?g ?K

goal (1 subgoal):
 1. (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x}) \<le> (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>)
[PROOF STEP]
by (smt (verit, ccfv_SIG) mem_Collect_eq)
[PROOF STATE]
proof (state)
this:
(\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x}) \<le> (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>)

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. f x) + sum f (X - {x \<in> X. 1 - \<beta> \<le> f x}) \<le> (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>)

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have "...  = card {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)} + (1-\<beta>) * card ( X- {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>) = real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>) = real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>x | x \<in> X \<and> 1 - \<beta> \<le> f x. 1) + (\<Sum>x\<in>X - {x \<in> X. 1 - \<beta> \<le> f x}. 1 - \<beta>) = real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have "... = (card {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)} +
    card (X- {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})) - \<beta> * card (X -{x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
using left_diff_distrib
[PROOF STATE]
proof (prove)
using this:
(?a - ?b) * ?c = ?a * ?c - ?b * ?c

goal (1 subgoal):
 1. real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
by (smt (verit, ccfv_threshold) mult.commute mult.right_neutral of_nat_1 of_nat_add of_nat_mult)
[PROOF STATE]
proof (state)
this:
real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real (card {x \<in> X. 1 - \<beta> \<le> f x}) + (1 - \<beta>) * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
have heq: "... = card X - \<beta> * card (X -{x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
using assms(1) card_Diff_subset[of "{x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)}" "X"] hcard
[PROOF STATE]
proof (prove)
using this:
finite X
\<lbrakk>finite {x \<in> X. 1 - \<beta> \<le> f x}; {x \<in> X. 1 - \<beta> \<le> f x} \<subseteq> X\<rbrakk> \<Longrightarrow> card (X - {x \<in> X. 1 - \<beta> \<le> f x}) = card X - card {x \<in> X. 1 - \<beta> \<le> f x}
card {x \<in> X. 1 - \<beta> \<le> f x} \<le> card X

goal (1 subgoal):
 1. real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real (card {x \<in> X. 1 - \<beta> \<le> f x} + card (X - {x \<in> X. 1 - \<beta> \<le> f x})) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) = real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(1 - \<alpha>) * real (card X) \<le> real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
have "(1- \<alpha>) * card X \<le> card X - \<beta> * card ( X -{x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
using this:
(1 - \<alpha>) * real (card X) \<le> real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha>) * real (card X) \<le> real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(1 - \<alpha>) * real (card X) \<le> real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(1 - \<alpha>) * real (card X) \<le> real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))
[PROOF STEP]
have "- (1- \<alpha>) * card X + card X \<ge> \<beta> * card ( X -{x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
using this:
(1 - \<alpha>) * real (card X) \<le> real (card X) - \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x}))

goal (1 subgoal):
 1. \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> - (1 - \<alpha>) * real (card X) + real (card X)
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> - (1 - \<alpha>) * real (card X) + real (card X)

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> - (1 - \<alpha>) * real (card X) + real (card X)
[PROOF STEP]
have "- card X + \<alpha> * card X + card X \<ge> \<beta> * card(X - {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
using this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> - (1 - \<alpha>) * real (card X) + real (card X)

goal (1 subgoal):
 1. \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> real_of_int (- int (card X)) + \<alpha> * real (card X) + real (card X)
[PROOF STEP]
using add.assoc add.commute
    add.right_neutral add_0 add_diff_cancel_right' add_diff_eq add_uminus_conv_diff diff_add_cancel
    distrib_right minus_diff_eq mult.commute mult_1 of_int_minus of_int_of_nat_eq uminus_add_conv_diff
    cancel_comm_monoid_add_class.diff_cancel
[PROOF STATE]
proof (prove)
using this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> - (1 - \<alpha>) * real (card X) + real (card X)
?a + ?b + ?c = ?a + (?b + ?c)
?a + ?b = ?b + ?a
?a + (0::?'a) = ?a
(0::?'a) + ?a = ?a
?a + ?b - ?b = ?a
?a + (?b - ?c) = ?a + ?b - ?c
?a + - ?b = ?a - ?b
?a - ?b + ?b = ?a
(?a + ?b) * ?c = ?a * ?c + ?b * ?c
- (?a - ?b) = ?b - ?a
?a * ?b = ?b * ?a
(1::?'a) * ?a = ?a
of_int (- ?z) = - of_int ?z
of_int (int ?n) = of_nat ?n
- ?a + ?b = ?b - ?a
?a - ?a = (0::?'a)

goal (1 subgoal):
 1. \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> real_of_int (- int (card X)) + \<alpha> * real (card X) + real (card X)
[PROOF STEP]
by (smt (verit, del_insts) mult_cancel_right2)
[PROOF STATE]
proof (state)
this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> real_of_int (- int (card X)) + \<alpha> * real (card X) + real (card X)

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> real_of_int (- int (card X)) + \<alpha> * real (card X) + real (card X)
[PROOF STEP]
have "\<alpha> * card X \<ge> \<beta> * card(X - {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
using this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> real_of_int (- int (card X)) + \<alpha> * real (card X) + real (card X)

goal (1 subgoal):
 1. \<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X)

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X)
[PROOF STEP]
have "\<alpha> * card X / \<beta> \<ge> card(X - {x. x \<in> X \<and> (f x \<ge> 1 - \<beta>)})"
[PROOF STATE]
proof (prove)
using this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X)

goal (1 subgoal):
 1. real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X) / \<beta>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<beta> * real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X)
finite X
?x12 \<in> X \<Longrightarrow> f ?x12 \<le> 1
0 < \<beta>
0 < \<alpha>
1 - \<alpha> \<le> expectation f
M = uniform_count_measure X

goal (1 subgoal):
 1. real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X) / \<beta>
[PROOF STEP]
by (smt (verit, ccfv_SIG) mult.commute pos_divide_less_eq)
[PROOF STATE]
proof (state)
this:
real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X) / \<beta>

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X) / \<beta>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real (card (X - {x \<in> X. 1 - \<beta> \<le> f x})) \<le> \<alpha> * real (card X) / \<beta>

goal (1 subgoal):
 1. (1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})
[PROOF STEP]
by (smt (verit) heq combine_common_factor left_diff_distrib' mult_of_nat_commute
    nat_mult_1_right of_nat_1 of_nat_add of_nat_mult times_divide_eq_left scale_minus_left)
[PROOF STATE]
proof (state)
this:
(1 - \<alpha> / \<beta>) * real (card X) \<le> real (card {x \<in> X. 1 - \<beta> \<le> f x})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_rel_compp: "\<langle>A O B, C O D\<rangle>sum_rel = \<langle>A,C\<rangle>sum_rel O \<langle>B,D\<rangle>sum_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>A O B, C O D\<rangle>sum_rel = \<langle>A, C\<rangle>sum_rel O \<langle>B, D\<rangle>sum_rel
[PROOF STEP]
using sum.rel_compp[of "rel2p A" "rel2p B" "rel2p C" "rel2p D"]
[PROOF STATE]
proof (prove)
using this:
rel_sum (rel2p A OO rel2p B) (rel2p C OO rel2p D) = rel_sum (rel2p A) (rel2p C) OO rel_sum (rel2p B) (rel2p D)

goal (1 subgoal):
 1. \<langle>A O B, C O D\<rangle>sum_rel = \<langle>A, C\<rangle>sum_rel O \<langle>B, D\<rangle>sum_rel
[PROOF STEP]
by (auto simp: rel2p(2-)[symmetric] rel2p_comp)


[STATEMENT]
lemma measure_completion[simp]: "S \<in> sets M \<Longrightarrow> measure (completion M) S = measure M S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<in> sets M \<Longrightarrow> Sigma_Algebra.measure (completion M) S = Sigma_Algebra.measure M S
[PROOF STEP]
unfolding measure_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<in> sets M \<Longrightarrow> enn2real (emeasure (completion M) S) = enn2real (emeasure M S)
[PROOF STEP]
by auto


[STATEMENT]
lemma sumset_stabilizer_eq_Class_Union:
  assumes "A \<subseteq> G"
  shows "sumset A (stabilizer B) = (\<Union> (Class B ` A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sumset A (stabilizer B) = \<Union> (Class B ` A)
[PROOF STEP]
by (simp add: assms sumset_subgroup_eq_Class_Union)


[STATEMENT]
lemma max_enat_minus1: "max n m - k = max (n - k) (m - k :: enat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max n m - k = max (n - k) (m - k)
[PROOF STEP]
by(cases n m k rule: enat.exhaust[case_product enat.exhaust[case_product enat.exhaust]]) simp_all


[STATEMENT]
lemma sconsts_sabs:
  "consts (Sabs cs) |\<subseteq>| S \<longleftrightarrow> list_all (\<lambda>(_, t). consts t |\<subseteq>| S) cs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (consts (Sabs cs) |\<subseteq>| S) = list_all (\<lambda>(uu_, t). consts t |\<subseteq>| S) cs
[PROOF STEP]
apply (auto simp: list_all_iff ffUnion_alt_def dest!: ffUnion_least_rev)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b x. \<lbrakk>fBall (fset_of_list cs) (\<lambda>x. (case x of (uu_, x) \<Rightarrow> consts x) |\<subseteq>| S); (a, b) \<in> set cs; x |\<in>| consts b\<rbrakk> \<Longrightarrow> x |\<in>| S
 2. \<And>x a b. \<lbrakk>\<forall>x\<in>set cs. case x of (uu_, t) \<Rightarrow> consts t |\<subseteq>| S; (a, b) |\<in>| fset_of_list cs; x |\<in>| consts b\<rbrakk> \<Longrightarrow> x |\<in>| S
[PROOF STEP]
apply (subst (asm) list_all_iff_fset[symmetric])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b x. \<lbrakk>list_all (\<lambda>x. (case x of (uu_, x) \<Rightarrow> consts x) |\<subseteq>| S) cs; (a, b) \<in> set cs; x |\<in>| consts b\<rbrakk> \<Longrightarrow> x |\<in>| S
 2. \<And>x a b. \<lbrakk>\<forall>x\<in>set cs. case x of (uu_, t) \<Rightarrow> consts t |\<subseteq>| S; (a, b) |\<in>| fset_of_list cs; x |\<in>| consts b\<rbrakk> \<Longrightarrow> x |\<in>| S
[PROOF STEP]
apply (auto simp: list_all_iff fset_of_list_elem)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma example2_properdiv_set: "properdiv_set (Suc (Suc (Suc 0))) = {(1::nat)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. properdiv_set (Suc (Suc (Suc 0))) = {1}
[PROOF STEP]
by (auto simp: properdiv_set proper_divisor_def less_Suc_eq dvd_def; presburger)


[STATEMENT]
lemma imirror_empty: "imirror {} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. imirror {} = {}
[PROOF STEP]
unfolding imirror_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (-) (iMin {} + Max {}) ` {} = {}
[PROOF STEP]
by simp


[STATEMENT]
lemma expands_to_lift_function:
  assumes "eventually (\<lambda>x. f x - eval c x = 0) at_top"
          "((\<lambda>x. g (eval (c :: 'a :: multiseries) x)) expands_to G) bs'"
  shows   "((\<lambda>x. g (f x)) expands_to G) bs'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. g (f x)) expands_to G) bs'
[PROOF STEP]
by (rule expands_to_cong[OF assms(2)]) (insert assms, auto elim: eventually_mono)


[STATEMENT]
lemma list_all2_refl_conv:
    "list_all2 P xs xs \<longleftrightarrow> (\<forall>x\<in>set xs. P x x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all2 P xs xs = (\<forall>x\<in>set xs. P x x)
[PROOF STEP]
by (induct xs) auto


[STATEMENT]
lemma lnth_prepend:
  "lnth (prepend xs ys) i = (if i < length xs then nth xs i else lnth ys (i - length xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lnth (prepend xs ys) i = (if i < length xs then xs ! i else lnth ys (i - length xs))
[PROOF STEP]
by (induct xs arbitrary: i) (auto simp: lnth_LCons' nth_Cons')


[STATEMENT]
lemma filter_union_zmset[simp]: "filter_zmset P (M + N) = filter_zmset P M + filter_zmset P N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter_zmset P (M + N) = filter_zmset P M + filter_zmset P N
[PROOF STEP]
by (rule zmultiset_eqI) simp


[STATEMENT]
lemma sgn_le_0_iff [simp]: "sgn x \<le> 0 \<longleftrightarrow> x \<le> 0"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sgn x \<le> 0) = (x \<le> 0)
[PROOF STEP]
by (cases "0::real" x rule: linorder_cases) simp_all


[STATEMENT]
lemma minimal_antichain_idempotent[simp]: "minimal_antichain (minimal_antichain A) = minimal_antichain A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. minimal_antichain (minimal_antichain A) = minimal_antichain A
[PROOF STEP]
by (auto simp: minimal_antichain_def)


[STATEMENT]
lemma inter_is_a_intersec: "is_a_intersec (inter (line A B) (line C D)) A B C D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_a_intersec (local.inter (line A B) (line C D)) A B C D
[PROOF STEP]
by (simp add: col_A_B_ABl col_A_B_lAB col_rot_CW is_a_intersec_def)