| author | wenzelm | 
| Sat, 04 Apr 2020 20:06:15 +0200 | |
| changeset 71687 | f17be1db8381 | 
| parent 71633 | 07bec530f02e | 
| child 71771 | 7c0de1eb6075 | 
| permissions | -rw-r--r-- | 
| 67968 | 1 | section \<open>Faces, Extreme Points, Polytopes, Polyhedra etc\<close> | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 3 | text\<open>Ported from HOL Light by L C Paulson\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 4 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 5 | theory Polytope | 
| 70641 
0e2a065d6f31
Theory Derivative no longer depends on Path_Connected
 paulson <lp15@cam.ac.uk> parents: 
70136diff
changeset | 6 | imports Cartesian_Euclidean_Space Path_Connected | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 7 | begin | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 8 | |
| 69683 | 9 | subsection \<open>Faces of a (usually convex) set\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 10 | |
| 70136 | 11 | definition\<^marker>\<open>tag important\<close> face_of :: "['a::real_vector set, 'a set] \<Rightarrow> bool" (infixr "(face'_of)" 50) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 12 | where | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 13 | "T face_of S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 14 | T \<subseteq> S \<and> convex T \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 15 | (\<forall>a \<in> S. \<forall>b \<in> S. \<forall>x \<in> T. x \<in> open_segment a b \<longrightarrow> a \<in> T \<and> b \<in> T)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 16 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 17 | lemma face_ofD: "\<lbrakk>T face_of S; x \<in> open_segment a b; a \<in> S; b \<in> S; x \<in> T\<rbrakk> \<Longrightarrow> a \<in> T \<and> b \<in> T" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 18 | unfolding face_of_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 19 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 20 | lemma face_of_translation_eq [simp]: | 
| 67399 | 21 | "((+) a ` T face_of (+) a ` S) \<longleftrightarrow> T face_of S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 22 | proof - | 
| 67399 | 23 | have *: "\<And>a T S. T face_of S \<Longrightarrow> ((+) a ` T face_of (+) a ` S)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 24 | apply (simp add: face_of_def Ball_def, clarify) | 
| 70641 
0e2a065d6f31
Theory Derivative no longer depends on Path_Connected
 paulson <lp15@cam.ac.uk> parents: 
70136diff
changeset | 25 | by (meson imageI open_segment_translation_eq) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 26 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 27 | apply (rule iffI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 28 | apply (force simp: image_comp o_def dest: * [where a = "-a"]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 29 | apply (blast intro: *) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 30 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 31 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 32 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 33 | lemma face_of_linear_image: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 34 | assumes "linear f" "inj f" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 35 | shows "(f ` c face_of f ` S) \<longleftrightarrow> c face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 36 | by (simp add: face_of_def inj_image_subset_iff inj_image_mem_iff open_segment_linear_image assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 37 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 38 | lemma face_of_refl: "convex S \<Longrightarrow> S face_of S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 39 | by (auto simp: face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 40 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 41 | lemma face_of_refl_eq: "S face_of S \<longleftrightarrow> convex S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 42 | by (auto simp: face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 43 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 44 | lemma empty_face_of [iff]: "{} face_of S"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 45 | by (simp add: face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 46 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 47 | lemma face_of_empty [simp]: "S face_of {} \<longleftrightarrow> S = {}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 48 | by (meson empty_face_of face_of_def subset_empty) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 49 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 50 | lemma face_of_trans [trans]: "\<lbrakk>S face_of T; T face_of u\<rbrakk> \<Longrightarrow> S face_of u" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 51 | unfolding face_of_def by (safe; blast) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 52 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 53 | lemma face_of_face: "T face_of S \<Longrightarrow> (f face_of T \<longleftrightarrow> f face_of S \<and> f \<subseteq> T)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 54 | unfolding face_of_def by (safe; blast) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 55 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 56 | lemma face_of_subset: "\<lbrakk>F face_of S; F \<subseteq> T; T \<subseteq> S\<rbrakk> \<Longrightarrow> F face_of T" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 57 | unfolding face_of_def by (safe; blast) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 58 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 59 | lemma face_of_slice: "\<lbrakk>F face_of S; convex T\<rbrakk> \<Longrightarrow> (F \<inter> T) face_of (S \<inter> T)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 60 | unfolding face_of_def by (blast intro: convex_Int) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 61 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 62 | lemma face_of_Int: "\<lbrakk>t1 face_of S; t2 face_of S\<rbrakk> \<Longrightarrow> (t1 \<inter> t2) face_of S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 63 | unfolding face_of_def by (blast intro: convex_Int) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 64 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 65 | lemma face_of_Inter: "\<lbrakk>A \<noteq> {}; \<And>T. T \<in> A \<Longrightarrow> T face_of S\<rbrakk> \<Longrightarrow> (\<Inter> A) face_of S"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 66 | unfolding face_of_def by (blast intro: convex_Inter) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 67 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 68 | lemma face_of_Int_Int: "\<lbrakk>F face_of T; F' face_of t'\<rbrakk> \<Longrightarrow> (F \<inter> F') face_of (T \<inter> t')" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 69 | unfolding face_of_def by (blast intro: convex_Int) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 70 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 71 | lemma face_of_imp_subset: "T face_of S \<Longrightarrow> T \<subseteq> S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 72 | unfolding face_of_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 73 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 74 | proposition face_of_imp_eq_affine_Int: | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 75 | fixes S :: "'a::euclidean_space set" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 76 | assumes S: "convex S" and T: "T face_of S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 77 | shows "T = (affine hull T) \<inter> S" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 78 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 79 | have "convex T" using T by (simp add: face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 80 | have *: False if x: "x \<in> affine hull T" and "x \<in> S" "x \<notin> T" and y: "y \<in> rel_interior T" for x y | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 81 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 82 | obtain e where "e>0" and e: "cball y e \<inter> affine hull T \<subseteq> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 83 | using y by (auto simp: rel_interior_cball) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 84 | have "y \<noteq> x" "y \<in> S" "y \<in> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 85 | using face_of_imp_subset rel_interior_subset T that by blast+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 86 |     then have zne: "\<And>u. \<lbrakk>u \<in> {0<..<1}; (1 - u) *\<^sub>R y + u *\<^sub>R x \<in> T\<rbrakk> \<Longrightarrow>  False"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 87 | using \<open>x \<in> S\<close> \<open>x \<notin> T\<close> \<open>T face_of S\<close> unfolding face_of_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 88 | apply clarify | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 89 | apply (drule_tac x=x in bspec, assumption) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 90 | apply (drule_tac x=y in bspec, assumption) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 91 | apply (subst (asm) open_segment_commute) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 92 | apply (force simp: open_segment_image_interval image_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 93 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 94 |     have in01: "min (1/2) (e / norm (x - y)) \<in> {0<..<1}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 95 | using \<open>y \<noteq> x\<close> \<open>e > 0\<close> by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 96 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 97 | apply (rule zne [OF in01]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 98 | apply (rule e [THEN subsetD]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 99 | apply (rule IntI) | 
| 63145 | 100 | using \<open>y \<noteq> x\<close> \<open>e > 0\<close> | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 101 | apply (simp add: cball_def dist_norm algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 102 | apply (simp add: Real_Vector_Spaces.scaleR_diff_right [symmetric] norm_minus_commute min_mult_distrib_right) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 103 | apply (rule mem_affine [OF affine_affine_hull _ x]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 104 | using \<open>y \<in> T\<close> apply (auto simp: hull_inc) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 105 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 106 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 107 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 108 | apply (rule subset_antisym) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 109 | using assms apply (simp add: hull_subset face_of_imp_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 110 |     apply (cases "T={}", simp)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 111 | apply (force simp: rel_interior_eq_empty [symmetric] \<open>convex T\<close> intro: *) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 112 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 113 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 114 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 115 | lemma face_of_imp_closed: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 116 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 117 | assumes "convex S" "closed S" "T face_of S" shows "closed T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 118 | by (metis affine_affine_hull affine_closed closed_Int face_of_imp_eq_affine_Int assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 119 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 120 | lemma face_of_Int_supporting_hyperplane_le_strong: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 121 |     assumes "convex(S \<inter> {x. a \<bullet> x = b})" and aleb: "\<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 122 |       shows "(S \<inter> {x. a \<bullet> x = b}) face_of S"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 123 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 124 | have *: "a \<bullet> u = a \<bullet> x" if "x \<in> open_segment u v" "u \<in> S" "v \<in> S" and b: "b = a \<bullet> x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 125 | for u v x | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 126 | proof (rule antisym) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 127 | show "a \<bullet> u \<le> a \<bullet> x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 128 | using aleb \<open>u \<in> S\<close> \<open>b = a \<bullet> x\<close> by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 129 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 130 | obtain \<xi> where "b = a \<bullet> ((1 - \<xi>) *\<^sub>R u + \<xi> *\<^sub>R v)" "0 < \<xi>" "\<xi> < 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 131 | using \<open>b = a \<bullet> x\<close> \<open>x \<in> open_segment u v\<close> in_segment | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 132 | by (auto simp: open_segment_image_interval split: if_split_asm) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 133 | then have "b + \<xi> * (a \<bullet> u) \<le> a \<bullet> u + \<xi> * b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 134 | using aleb [OF \<open>v \<in> S\<close>] by (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 135 | then have "(1 - \<xi>) * b \<le> (1 - \<xi>) * (a \<bullet> u)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 136 | by (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 137 | then have "b \<le> a \<bullet> u" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 138 | using \<open>\<xi> < 1\<close> by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 139 | with b show "a \<bullet> x \<le> a \<bullet> u" by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 140 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 141 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 142 | apply (simp add: face_of_def assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 143 | using "*" open_segment_commute by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 144 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 145 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 146 | lemma face_of_Int_supporting_hyperplane_ge_strong: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 147 |    "\<lbrakk>convex(S \<inter> {x. a \<bullet> x = b}); \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b\<rbrakk>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 148 |     \<Longrightarrow> (S \<inter> {x. a \<bullet> x = b}) face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 149 | using face_of_Int_supporting_hyperplane_le_strong [of S "-a" "-b"] by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 150 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 151 | lemma face_of_Int_supporting_hyperplane_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 152 |     "\<lbrakk>convex S; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b\<rbrakk> \<Longrightarrow> (S \<inter> {x. a \<bullet> x = b}) face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 153 | by (simp add: convex_Int convex_hyperplane face_of_Int_supporting_hyperplane_le_strong) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 154 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 155 | lemma face_of_Int_supporting_hyperplane_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 156 |     "\<lbrakk>convex S; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b\<rbrakk> \<Longrightarrow> (S \<inter> {x. a \<bullet> x = b}) face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 157 | by (simp add: convex_Int convex_hyperplane face_of_Int_supporting_hyperplane_ge_strong) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 158 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 159 | lemma face_of_imp_convex: "T face_of S \<Longrightarrow> convex T" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 160 | using face_of_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 161 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 162 | lemma face_of_imp_compact: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 163 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 164 | shows "\<lbrakk>convex S; compact S; T face_of S\<rbrakk> \<Longrightarrow> compact T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 165 | by (meson bounded_subset compact_eq_bounded_closed face_of_imp_closed face_of_imp_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 166 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 167 | lemma face_of_Int_subface: | 
| 63469 
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
 paulson <lp15@cam.ac.uk> parents: 
63265diff
changeset | 168 | "\<lbrakk>A \<inter> B face_of A; A \<inter> B face_of B; C face_of A; D face_of B\<rbrakk> | 
| 
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
 paulson <lp15@cam.ac.uk> parents: 
63265diff
changeset | 169 | \<Longrightarrow> (C \<inter> D) face_of C \<and> (C \<inter> D) face_of D" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 170 | by (meson face_of_Int_Int face_of_face inf_le1 inf_le2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 171 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 172 | lemma subset_of_face_of: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 173 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 174 |     assumes "T face_of S" "u \<subseteq> S" "T \<inter> (rel_interior u) \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 175 | shows "u \<subseteq> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 176 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 177 | fix c | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 178 | assume "c \<in> u" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 179 | obtain b where "b \<in> T" "b \<in> rel_interior u" using assms by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 180 | then obtain e where "e>0" "b \<in> u" and e: "cball b e \<inter> affine hull u \<subseteq> u" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 181 | by (auto simp: rel_interior_cball) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 182 | show "c \<in> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 183 | proof (cases "b=c") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 184 | case True with \<open>b \<in> T\<close> show ?thesis by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 185 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 186 | case False | 
| 63148 | 187 | define d where "d = b + (e / norm(b - c)) *\<^sub>R (b - c)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 188 | have "d \<in> cball b e \<inter> affine hull u" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 189 | using \<open>e > 0\<close> \<open>b \<in> u\<close> \<open>c \<in> u\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 190 | by (simp add: d_def dist_norm hull_inc mem_affine_3_minus False) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 191 | with e have "d \<in> u" by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 192 | have nbc: "norm (b - c) + e > 0" using \<open>e > 0\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 193 | by (metis add.commute le_less_trans less_add_same_cancel2 norm_ge_zero) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 194 | then have [simp]: "d \<noteq> c" using False scaleR_cancel_left [of "1 + (e / norm (b - c))" b c] | 
| 70817 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 haftmann parents: 
70641diff
changeset | 195 | by (simp add: algebra_simps d_def) (simp add: field_split_simps) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 196 | have [simp]: "((e - e * e / (e + norm (b - c))) / norm (b - c)) = (e / (e + norm (b - c)))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 197 | using False nbc | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 198 | by (simp add: divide_simps) (simp add: algebra_simps) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 199 | have "b \<in> open_segment d c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 200 | apply (simp add: open_segment_image_interval) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 201 | apply (simp add: d_def algebra_simps image_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 202 | apply (rule_tac x="e / (e + norm (b - c))" in bexI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 203 | using False nbc \<open>0 < e\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 204 | apply (auto simp: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 205 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 206 | then have "d \<in> T \<and> c \<in> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 207 | apply (rule face_ofD [OF \<open>T face_of S\<close>]) | 
| 63145 | 208 | using \<open>d \<in> u\<close> \<open>c \<in> u\<close> \<open>u \<subseteq> S\<close> \<open>b \<in> T\<close> apply auto | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 209 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 210 | then show ?thesis .. | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 211 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 212 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 213 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 214 | lemma face_of_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 215 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 216 |     assumes "T face_of S" "u face_of S" "(rel_interior T) \<inter> (rel_interior u) \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 217 | shows "T = u" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 218 | apply (rule subset_antisym) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 219 | apply (metis assms disjoint_iff_not_equal face_of_imp_subset rel_interior_subset subsetCE subset_of_face_of) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 220 | by (metis assms disjoint_iff_not_equal face_of_imp_subset rel_interior_subset subset_iff subset_of_face_of) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 221 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 222 | lemma face_of_disjoint_rel_interior: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 223 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 224 | assumes "T face_of S" "T \<noteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 225 |         shows "T \<inter> rel_interior S = {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 226 | by (meson assms subset_of_face_of face_of_imp_subset order_refl subset_antisym) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 227 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 228 | lemma face_of_disjoint_interior: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 229 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 230 | assumes "T face_of S" "T \<noteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 231 |         shows "T \<inter> interior S = {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 232 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 233 | have "T \<inter> interior S \<subseteq> rel_interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 234 | by (meson inf_sup_ord(2) interior_subset_rel_interior order.trans) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 235 | thus ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 236 | by (metis (no_types) Int_greatest assms face_of_disjoint_rel_interior inf_sup_ord(1) subset_empty) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 237 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 238 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 239 | lemma face_of_subset_rel_boundary: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 240 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 241 | assumes "T face_of S" "T \<noteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 242 | shows "T \<subseteq> (S - rel_interior S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 243 | by (meson DiffI assms disjoint_iff_not_equal face_of_disjoint_rel_interior face_of_imp_subset rev_subsetD subsetI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 244 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 245 | lemma face_of_subset_rel_frontier: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 246 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 247 | assumes "T face_of S" "T \<noteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 248 | shows "T \<subseteq> rel_frontier S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 249 | using assms closure_subset face_of_disjoint_rel_interior face_of_imp_subset rel_frontier_def by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 250 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 251 | lemma face_of_aff_dim_lt: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 252 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 253 | assumes "convex S" "T face_of S" "T \<noteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 254 | shows "aff_dim T < aff_dim S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 255 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 256 | have "aff_dim T \<le> aff_dim S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 257 | by (simp add: face_of_imp_subset aff_dim_subset assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 258 | moreover have "aff_dim T \<noteq> aff_dim S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 259 |   proof (cases "T = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 260 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 261 | by (metis aff_dim_empty \<open>T \<noteq> S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 262 | next case False then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 263 | by (metis Set.set_insert assms convex_rel_frontier_aff_dim dual_order.irrefl face_of_imp_convex face_of_subset_rel_frontier insert_not_empty subsetI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 264 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 265 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 266 | by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 267 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 268 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 269 | lemma subset_of_face_of_affine_hull: | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 270 | fixes S :: "'a::euclidean_space set" | 
| 69508 | 271 | assumes T: "T face_of S" and "convex S" "U \<subseteq> S" and dis: "\<not> disjnt (affine hull T) (rel_interior U)" | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 272 | shows "U \<subseteq> T" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 273 | apply (rule subset_of_face_of [OF T \<open>U \<subseteq> S\<close>]) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 274 | using face_of_imp_eq_affine_Int [OF \<open>convex S\<close> T] | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 275 | using rel_interior_subset [of U] dis | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 276 | using \<open>U \<subseteq> S\<close> disjnt_def by fastforce | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 277 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 278 | lemma affine_hull_face_of_disjoint_rel_interior: | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 279 | fixes S :: "'a::euclidean_space set" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 280 | assumes "convex S" "F face_of S" "F \<noteq> S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 281 |   shows "affine hull F \<inter> rel_interior S = {}"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 282 | by (metis assms disjnt_def face_of_imp_subset order_refl subset_antisym subset_of_face_of_affine_hull) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 283 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 284 | lemma affine_diff_divide: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 285 | assumes "affine S" "k \<noteq> 0" "k \<noteq> 1" and xy: "x \<in> S" "y /\<^sub>R (1 - k) \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 286 | shows "(x - y) /\<^sub>R k \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 287 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 288 | have "inverse(k) *\<^sub>R (x - y) = (1 - inverse k) *\<^sub>R inverse(1 - k) *\<^sub>R y + inverse(k) *\<^sub>R x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 289 | using assms | 
| 70817 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 haftmann parents: 
70641diff
changeset | 290 | by (simp add: algebra_simps) (simp add: scaleR_left_distrib [symmetric] field_split_simps) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 291 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 292 | using \<open>affine S\<close> xy by (auto simp: affine_alt) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 293 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 294 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 295 | proposition face_of_convex_hulls: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 296 |       assumes S: "finite S" "T \<subseteq> S" and disj: "affine hull T \<inter> convex hull (S - T) = {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 297 | shows "(convex hull T) face_of (convex hull S)" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 298 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 299 | have fin: "finite T" "finite (S - T)" using assms | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 300 | by (auto simp: finite_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 301 | have *: "x \<in> convex hull T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 302 | if x: "x \<in> convex hull S" and y: "y \<in> convex hull S" and w: "w \<in> convex hull T" "w \<in> open_segment x y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 303 | for x y w | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 304 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 305 | have waff: "w \<in> affine hull T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 306 | using convex_hull_subset_affine_hull w by blast | 
| 64267 | 307 | obtain a b where a: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> a i" and asum: "sum a S = 1" and aeqx: "(\<Sum>i\<in>S. a i *\<^sub>R i) = x" | 
| 308 | and b: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> b i" and bsum: "sum b S = 1" and beqy: "(\<Sum>i\<in>S. b i *\<^sub>R i) = y" | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 309 | using x y by (auto simp: assms convex_hull_finite) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 310 | obtain u where "(1 - u) *\<^sub>R x + u *\<^sub>R y \<in> convex hull T" "x \<noteq> y" and weq: "w = (1 - u) *\<^sub>R x + u *\<^sub>R y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 311 | and u01: "0 < u" "u < 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 312 | using w by (auto simp: open_segment_image_interval split: if_split_asm) | 
| 63148 | 313 | define c where "c i = (1 - u) * a i + u * b i" for i | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 314 | have cge0: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> c i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 315 | using a b u01 by (simp add: c_def) | 
| 64267 | 316 | have sumc1: "sum c S = 1" | 
| 317 | by (simp add: c_def sum.distrib sum_distrib_left [symmetric] asum bsum) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 318 | have sumci_xy: "(\<Sum>i\<in>S. c i *\<^sub>R i) = (1 - u) *\<^sub>R x + u *\<^sub>R y" | 
| 64267 | 319 | apply (simp add: c_def sum.distrib scaleR_left_distrib) | 
| 320 | by (simp only: scaleR_scaleR [symmetric] Real_Vector_Spaces.scaleR_right.sum [symmetric] aeqx beqy) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 321 | show ?thesis | 
| 64267 | 322 | proof (cases "sum c (S - T) = 0") | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 323 | case True | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 324 | have ci0: "\<And>i. i \<in> (S - T) \<Longrightarrow> c i = 0" | 
| 65680 
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
 paulson <lp15@cam.ac.uk> parents: 
64267diff
changeset | 325 | using True cge0 fin(2) sum_nonneg_eq_0_iff by auto | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 326 | have a0: "a i = 0" if "i \<in> (S - T)" for i | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 327 | using ci0 [OF that] u01 a [of i] b [of i] that | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 328 | by (simp add: c_def Groups.ordered_comm_monoid_add_class.add_nonneg_eq_0_iff) | 
| 64267 | 329 | have [simp]: "sum a T = 1" | 
| 330 | using assms by (metis sum.mono_neutral_cong_right a0 asum) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 331 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 332 | apply (simp add: convex_hull_finite \<open>finite T\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 333 | apply (rule_tac x=a in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 334 | using a0 assms | 
| 64267 | 335 | apply (auto simp: cge0 a aeqx [symmetric] sum.mono_neutral_right) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 336 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 337 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 338 | case False | 
| 64267 | 339 | define k where "k = sum c (S - T)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 340 | have "k > 0" using False | 
| 64267 | 341 | unfolding k_def by (metis DiffD1 antisym_conv cge0 sum_nonneg not_less) | 
| 342 | have weq_sumsum: "w = sum (\<lambda>x. c x *\<^sub>R x) T + sum (\<lambda>x. c x *\<^sub>R x) (S - T)" | |
| 343 | by (metis (no_types) add.commute S(1) S(2) sum.subset_diff sumci_xy weq) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 344 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 345 | proof (cases "k = 1") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 346 | case True | 
| 64267 | 347 | then have "sum c T = 0" | 
| 348 | by (simp add: S k_def sum_diff sumc1) | |
| 349 | then have [simp]: "sum c (S - T) = 1" | |
| 350 | by (simp add: S sum_diff sumc1) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 351 | have ci0: "\<And>i. i \<in> T \<Longrightarrow> c i = 0" | 
| 64267 | 352 | by (meson \<open>finite T\<close> \<open>sum c T = 0\<close> \<open>T \<subseteq> S\<close> cge0 sum_nonneg_eq_0_iff subsetCE) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 353 | then have [simp]: "(\<Sum>i\<in>S-T. c i *\<^sub>R i) = w" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 354 | by (simp add: weq_sumsum) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 355 | have "w \<in> convex hull (S - T)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 356 | apply (simp add: convex_hull_finite fin) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 357 | apply (rule_tac x=c in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 358 | apply (auto simp: cge0 weq True k_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 359 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 360 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 361 | using disj waff by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 362 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 363 | case False | 
| 64267 | 364 | then have sumcf: "sum c T = 1 - k" | 
| 365 | by (simp add: S k_def sum_diff sumc1) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 366 | have "(\<Sum>i\<in>T. c i *\<^sub>R i) /\<^sub>R (1 - k) \<in> convex hull T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 367 | apply (simp add: convex_hull_finite fin) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 368 | apply (rule_tac x="\<lambda>i. inverse (1-k) * c i" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 369 | apply auto | 
| 64267 | 370 | apply (metis sumcf cge0 inverse_nonnegative_iff_nonnegative mult_nonneg_nonneg S(2) sum_nonneg subsetCE) | 
| 371 | apply (metis False mult.commute right_inverse right_minus_eq sum_distrib_left sumcf) | |
| 372 | by (metis (mono_tags, lifting) scaleR_right.sum scaleR_scaleR sum.cong) | |
| 373 | with \<open>0 < k\<close> have "inverse(k) *\<^sub>R (w - sum (\<lambda>i. c i *\<^sub>R i) T) \<in> affine hull T" | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 374 | by (simp add: affine_diff_divide [OF affine_affine_hull] False waff convex_hull_subset_affine_hull [THEN subsetD]) | 
| 64267 | 375 | moreover have "inverse(k) *\<^sub>R (w - sum (\<lambda>x. c x *\<^sub>R x) T) \<in> convex hull (S - T)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 376 | apply (simp add: weq_sumsum convex_hull_finite fin) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 377 | apply (rule_tac x="\<lambda>i. inverse k * c i" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 378 | using \<open>k > 0\<close> cge0 | 
| 64267 | 379 | apply (auto simp: scaleR_right.sum sum_distrib_left [symmetric] k_def [symmetric]) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 380 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 381 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 382 | using disj by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 383 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 384 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 385 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 386 | have [simp]: "convex hull T \<subseteq> convex hull S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 387 | by (simp add: \<open>T \<subseteq> S\<close> hull_mono) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 388 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 389 | using open_segment_commute by (auto simp: face_of_def intro: *) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 390 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 391 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 392 | proposition face_of_convex_hull_insert: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 393 | "\<lbrakk>finite S; a \<notin> affine hull S; T face_of convex hull S\<rbrakk> \<Longrightarrow> T face_of convex hull insert a S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 394 | apply (rule face_of_trans, blast) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 395 | apply (rule face_of_convex_hulls; force simp: insert_Diff_if) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 396 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 397 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 398 | proposition face_of_affine_trivial: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 399 | assumes "affine S" "T face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 400 |     shows "T = {} \<or> T = S"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 401 | proof (rule ccontr, clarsimp) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 402 |   assume "T \<noteq> {}" "T \<noteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 403 | then obtain a where "a \<in> T" by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 404 | then have "a \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 405 | using \<open>T face_of S\<close> face_of_imp_subset by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 406 | have "S \<subseteq> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 407 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 408 | fix b assume "b \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 409 | show "b \<in> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 410 | proof (cases "a = b") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 411 | case True with \<open>a \<in> T\<close> show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 412 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 413 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 414 | then have "a \<in> open_segment (2 *\<^sub>R a - b) b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 415 | apply (auto simp: open_segment_def closed_segment_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 416 | apply (rule_tac x="1/2" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 417 | apply (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 418 | by (simp add: scaleR_2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 419 | moreover have "2 *\<^sub>R a - b \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 420 | by (rule mem_affine [OF \<open>affine S\<close> \<open>a \<in> S\<close> \<open>b \<in> S\<close>, of 2 "-1", simplified]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 421 | moreover note \<open>b \<in> S\<close> \<open>a \<in> T\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 422 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 423 | by (rule face_ofD [OF \<open>T face_of S\<close>, THEN conjunct2]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 424 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 425 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 426 | then show False | 
| 63145 | 427 | using \<open>T \<noteq> S\<close> \<open>T face_of S\<close> face_of_imp_subset by blast | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 428 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 429 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 430 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 431 | lemma face_of_affine_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 432 |    "affine S \<Longrightarrow> (T face_of S \<longleftrightarrow> T = {} \<or> T = S)"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 433 | using affine_imp_convex face_of_affine_trivial face_of_refl by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 434 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 435 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 436 | proposition Inter_faces_finite_altbound: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 437 | fixes T :: "'a::euclidean_space set set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 438 | assumes cfaI: "\<And>c. c \<in> T \<Longrightarrow> c face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 439 |     shows "\<exists>F'. finite F' \<and> F' \<subseteq> T \<and> card F' \<le> DIM('a) + 2 \<and> \<Inter>F' = \<Inter>T"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 440 | proof (cases "\<forall>F'. finite F' \<and> F' \<subseteq> T \<and> card F' \<le> DIM('a) + 2 \<longrightarrow> (\<exists>c. c \<in> T \<and> c \<inter> (\<Inter>F') \<subset> (\<Inter>F'))")
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 441 | case True | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 442 | then obtain c where c: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 443 |        "\<And>F'. \<lbrakk>finite F'; F' \<subseteq> T; card F' \<le> DIM('a) + 2\<rbrakk> \<Longrightarrow> c F' \<in> T \<and> c F' \<inter> (\<Inter>F') \<subset> (\<Inter>F')"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 444 | by metis | 
| 63148 | 445 |   define d where "d = rec_nat {c{}} (\<lambda>n r. insert (c r) r)"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 446 |   have [simp]: "d 0 = {c {}}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 447 | by (simp add: d_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 448 | have dSuc [simp]: "\<And>n. d (Suc n) = insert (c (d n)) (d n)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 449 | by (simp add: d_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 450 |   have dn_notempty: "d n \<noteq> {}" for n
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 451 | by (induction n) auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 452 |   have dn_le_Suc: "d n \<subseteq> T \<and> finite(d n) \<and> card(d n) \<le> Suc n" if "n \<le> DIM('a) + 2" for n
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 453 | using that | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 454 | proof (induction n) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 455 | case 0 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 456 | then show ?case by (simp add: c) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 457 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 458 | case (Suc n) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 459 | then show ?case by (auto simp: c card_insert_if) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 460 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 461 |   have aff_dim_le: "aff_dim(\<Inter>(d n)) \<le> DIM('a) - int n" if "n \<le> DIM('a) + 2" for n
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 462 | using that | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 463 | proof (induction n) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 464 | case 0 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 465 | then show ?case | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 466 | by (simp add: aff_dim_le_DIM) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 467 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 468 | case (Suc n) | 
| 69745 | 469 | have fs: "\<Inter>(d (Suc n)) face_of S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 470 | by (meson Suc.prems cfaI dn_le_Suc dn_notempty face_of_Inter subsetCE) | 
| 69745 | 471 | have condn: "convex (\<Inter>(d n))" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 472 | using Suc.prems nat_le_linear not_less_eq_eq | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 473 | by (blast intro: face_of_imp_convex cfaI convex_Inter dest: dn_le_Suc) | 
| 69745 | 474 | have fdn: "\<Inter>(d (Suc n)) face_of \<Inter>(d n)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 475 | by (metis (no_types, lifting) Inter_anti_mono Suc.prems dSuc cfaI dn_le_Suc dn_notempty face_of_Inter face_of_imp_subset face_of_subset subset_iff subset_insertI) | 
| 69745 | 476 | have ne: "\<Inter>(d (Suc n)) \<noteq> \<Inter>(d n)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 477 | by (metis (no_types, lifting) Suc.prems Suc_leD c complete_lattice_class.Inf_insert dSuc dn_le_Suc less_irrefl order.trans) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 478 | have *: "\<And>m::int. \<And>d. \<And>d'::int. d < d' \<and> d' \<le> m - n \<Longrightarrow> d \<le> m - of_nat(n+1)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 479 | by arith | 
| 69745 | 480 | have "aff_dim (\<Inter>(d (Suc n))) < aff_dim (\<Inter>(d n))" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 481 | by (rule face_of_aff_dim_lt [OF condn fdn ne]) | 
| 69745 | 482 |     moreover have "aff_dim (\<Inter>(d n)) \<le> int (DIM('a)) - int n"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 483 | using Suc by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 484 | ultimately | 
| 69745 | 485 |     have "aff_dim (\<Inter>(d (Suc n))) \<le> int (DIM('a)) - (n+1)" by arith
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 486 | then show ?case by linarith | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 487 | qed | 
| 69745 | 488 |   have "aff_dim (\<Inter>(d (DIM('a) + 2))) \<le> -2"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 489 | using aff_dim_le [OF order_refl] by simp | 
| 69745 | 490 |   with aff_dim_geq [of "\<Inter>(d (DIM('a) + 2))"] show ?thesis
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 491 | using order.trans by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 492 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 493 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 494 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 495 | apply simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 496 | apply (erule ex_forward) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 497 | by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 498 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 499 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 500 | lemma faces_of_translation: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 501 |    "{F. F face_of image (\<lambda>x. a + x) S} = image (image (\<lambda>x. a + x)) {F. F face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 502 | apply (rule subset_antisym, clarify) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 503 | apply (auto simp: image_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 504 | apply (metis face_of_imp_subset face_of_translation_eq subset_imageE) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 505 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 506 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 507 | proposition face_of_Times: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 508 | assumes "F face_of S" and "F' face_of S'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 509 | shows "(F \<times> F') face_of (S \<times> S')" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 510 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 511 | have "F \<times> F' \<subseteq> S \<times> S'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 512 | using assms [unfolded face_of_def] by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 513 | moreover | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 514 | have "convex (F \<times> F')" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 515 | using assms [unfolded face_of_def] by (blast intro: convex_Times) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 516 | moreover | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 517 | have "a \<in> F \<and> a' \<in> F' \<and> b \<in> F \<and> b' \<in> F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 518 | if "a \<in> S" "b \<in> S" "a' \<in> S'" "b' \<in> S'" "x \<in> F \<times> F'" "x \<in> open_segment (a,a') (b,b')" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 519 | for a b a' b' x | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 520 | proof (cases "b=a \<or> b'=a'") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 521 | case True with that show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 522 | using assms | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 523 | by (force simp: in_segment dest: face_ofD) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 524 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 525 | case False with assms [unfolded face_of_def] that show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 526 | by (blast dest!: open_segment_PairD) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 527 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 528 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 529 | unfolding face_of_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 530 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 531 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 532 | corollary face_of_Times_decomp: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 533 | fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 534 | shows "c face_of (S \<times> S') \<longleftrightarrow> (\<exists>F F'. F face_of S \<and> F' face_of S' \<and> c = F \<times> F')" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 535 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 536 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 537 | assume c: ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 538 | show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 539 |   proof (cases "c = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 540 | case True then show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 541 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 542 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 543 | have 1: "fst ` c \<subseteq> S" "snd ` c \<subseteq> S'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 544 | using c face_of_imp_subset by fastforce+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 545 | have "convex c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 546 | using c by (metis face_of_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 547 | have conv: "convex (fst ` c)" "convex (snd ` c)" | 
| 71244 | 548 | by (simp_all add: \<open>convex c\<close> convex_linear_image linear_fst linear_snd) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 549 | have fstab: "a \<in> fst ` c \<and> b \<in> fst ` c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 550 | if "a \<in> S" "b \<in> S" "x \<in> open_segment a b" "(x,x') \<in> c" for a b x x' | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 551 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 552 | have *: "(x,x') \<in> open_segment (a,x') (b,x')" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 553 | using that by (auto simp: in_segment) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 554 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 555 | using face_ofD [OF c *] that face_of_imp_subset [OF c] by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 556 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 557 | have fst: "fst ` c face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 558 | by (force simp: face_of_def 1 conv fstab) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 559 | have sndab: "a' \<in> snd ` c \<and> b' \<in> snd ` c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 560 | if "a' \<in> S'" "b' \<in> S'" "x' \<in> open_segment a' b'" "(x,x') \<in> c" for a' b' x x' | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 561 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 562 | have *: "(x,x') \<in> open_segment (x,a') (x,b')" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 563 | using that by (auto simp: in_segment) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 564 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 565 | using face_ofD [OF c *] that face_of_imp_subset [OF c] by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 566 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 567 | have snd: "snd ` c face_of S'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 568 | by (force simp: face_of_def 1 conv sndab) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 569 | have cc: "rel_interior c \<subseteq> rel_interior (fst ` c) \<times> rel_interior (snd ` c)" | 
| 71244 | 570 | by (force simp: face_of_Times rel_interior_Times conv fst snd \<open>convex c\<close> linear_fst linear_snd rel_interior_convex_linear_image [symmetric]) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 571 | have "c = fst ` c \<times> snd ` c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 572 | apply (rule face_of_eq [OF c]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 573 | apply (simp_all add: face_of_Times rel_interior_Times conv fst snd) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 574 | using False rel_interior_eq_empty \<open>convex c\<close> cc | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 575 | apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 576 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 577 | with fst snd show ?thesis by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 578 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 579 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 580 | assume ?rhs with face_of_Times show ?lhs by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 581 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 582 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 583 | lemma face_of_Times_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 584 | fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 585 | shows "(F \<times> F') face_of (S \<times> S') \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 586 |            F = {} \<or> F' = {} \<or> F face_of S \<and> F' face_of S'"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 587 | by (auto simp: face_of_Times_decomp times_eq_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 588 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 589 | lemma hyperplane_face_of_halfspace_le: "{x. a \<bullet> x = b} face_of {x. a \<bullet> x \<le> b}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 590 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 591 |   have "{x. a \<bullet> x \<le> b} \<inter> {x. a \<bullet> x = b} = {x. a \<bullet> x = b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 592 | by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 593 | with face_of_Int_supporting_hyperplane_le [OF convex_halfspace_le [of a b], of a b] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 594 | show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 595 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 596 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 597 | lemma hyperplane_face_of_halfspace_ge: "{x. a \<bullet> x = b} face_of {x. a \<bullet> x \<ge> b}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 598 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 599 |   have "{x. a \<bullet> x \<ge> b} \<inter> {x. a \<bullet> x = b} = {x. a \<bullet> x = b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 600 | by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 601 | with face_of_Int_supporting_hyperplane_ge [OF convex_halfspace_ge [of b a], of b a] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 602 | show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 603 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 604 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 605 | lemma face_of_halfspace_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 606 | fixes a :: "'n::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 607 |   shows "F face_of {x. a \<bullet> x \<le> b} \<longleftrightarrow>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 608 |          F = {} \<or> F = {x. a \<bullet> x = b} \<or> F = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 609 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 610 | proof (cases "a = 0") | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 611 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 612 | using face_of_affine_eq affine_UNIV by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 613 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 614 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 615 |   then have ine: "interior {x. a \<bullet> x \<le> b} \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 616 | using halfspace_eq_empty_lt interior_halfspace_le by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 617 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 618 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 619 | assume L: ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 620 |     have "F \<noteq> {x. a \<bullet> x \<le> b} \<Longrightarrow> F face_of {x. a \<bullet> x = b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 621 | using False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 622 | apply (simp add: frontier_halfspace_le [symmetric] rel_frontier_nonempty_interior [OF ine, symmetric]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 623 | apply (rule face_of_subset [OF L]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 624 | apply (simp add: face_of_subset_rel_frontier [OF L]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 625 | apply (force simp: rel_frontier_def closed_halfspace_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 626 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 627 | with L show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 628 | using affine_hyperplane face_of_affine_eq by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 629 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 630 | assume ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 631 | then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 632 | by (metis convex_halfspace_le empty_face_of face_of_refl hyperplane_face_of_halfspace_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 633 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 634 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 635 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 636 | lemma face_of_halfspace_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 637 | fixes a :: "'n::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 638 |   shows "F face_of {x. a \<bullet> x \<ge> b} \<longleftrightarrow>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 639 |          F = {} \<or> F = {x. a \<bullet> x = b} \<or> F = {x. a \<bullet> x \<ge> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 640 | using face_of_halfspace_le [of F "-a" "-b"] by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 641 | |
| 69683 | 642 | subsection\<open>Exposed faces\<close> | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 643 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 644 | text\<open>That is, faces that are intersection with supporting hyperplane\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 645 | |
| 70136 | 646 | definition\<^marker>\<open>tag important\<close> exposed_face_of :: "['a::euclidean_space set, 'a set] \<Rightarrow> bool" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 647 | (infixr "(exposed'_face'_of)" 50) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 648 | where "T exposed_face_of S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 649 |          T face_of S \<and> (\<exists>a b. S \<subseteq> {x. a \<bullet> x \<le> b} \<and> T = S \<inter> {x. a \<bullet> x = b})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 650 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 651 | lemma empty_exposed_face_of [iff]: "{} exposed_face_of S"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 652 | apply (simp add: exposed_face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 653 | apply (rule_tac x=0 in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 654 | apply (rule_tac x=1 in exI, force) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 655 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 656 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 657 | lemma exposed_face_of_refl_eq [simp]: "S exposed_face_of S \<longleftrightarrow> convex S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 658 | apply (simp add: exposed_face_of_def face_of_refl_eq, auto) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 659 | apply (rule_tac x=0 in exI)+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 660 | apply force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 661 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 662 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 663 | lemma exposed_face_of_refl: "convex S \<Longrightarrow> S exposed_face_of S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 664 | by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 665 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 666 | lemma exposed_face_of: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 667 | "T exposed_face_of S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 668 | T face_of S \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 669 |      (T = {} \<or> T = S \<or>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 670 |       (\<exists>a b. a \<noteq> 0 \<and> S \<subseteq> {x. a \<bullet> x \<le> b} \<and> T = S \<inter> {x. a \<bullet> x = b}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 671 | proof (cases "T = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 672 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 673 | by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 674 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 675 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 676 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 677 | proof (cases "T = S") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 678 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 679 | by (simp add: face_of_refl_eq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 680 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 681 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 682 |     with \<open>T \<noteq> {}\<close> show ?thesis
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 683 | apply (auto simp: exposed_face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 684 | apply (metis inner_zero_left) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 685 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 686 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 687 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 688 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 689 | lemma exposed_face_of_Int_supporting_hyperplane_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 690 |    "\<lbrakk>convex S; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b\<rbrakk> \<Longrightarrow> (S \<inter> {x. a \<bullet> x = b}) exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 691 | by (force simp: exposed_face_of_def face_of_Int_supporting_hyperplane_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 692 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 693 | lemma exposed_face_of_Int_supporting_hyperplane_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 694 |    "\<lbrakk>convex S; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b\<rbrakk> \<Longrightarrow> (S \<inter> {x. a \<bullet> x = b}) exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 695 | using exposed_face_of_Int_supporting_hyperplane_le [of S "-a" "-b"] by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 696 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 697 | proposition exposed_face_of_Int: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 698 | assumes "T exposed_face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 699 | and "u exposed_face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 700 | shows "(T \<inter> u) exposed_face_of S" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 701 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 702 |   obtain a b where T: "S \<inter> {x. a \<bullet> x = b} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 703 |                and S: "S \<subseteq> {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 704 |                and teq: "T = S \<inter> {x. a \<bullet> x = b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 705 | using assms by (auto simp: exposed_face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 706 |   obtain a' b' where u: "S \<inter> {x. a' \<bullet> x = b'} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 707 |                  and s': "S \<subseteq> {x. a' \<bullet> x \<le> b'}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 708 |                  and ueq: "u = S \<inter> {x. a' \<bullet> x = b'}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 709 | using assms by (auto simp: exposed_face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 710 | have tu: "T \<inter> u face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 711 | using T teq u ueq by (simp add: face_of_Int) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 712 |   have ss: "S \<subseteq> {x. (a + a') \<bullet> x \<le> b + b'}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 713 | using S s' by (force simp: inner_left_distrib) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 714 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 715 | apply (simp add: exposed_face_of_def tu) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 716 | apply (rule_tac x="a+a'" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 717 | apply (rule_tac x="b+b'" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 718 | using S s' | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 719 | apply (fastforce simp: ss inner_left_distrib teq ueq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 720 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 721 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 722 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 723 | proposition exposed_face_of_Inter: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 724 | fixes P :: "'a::euclidean_space set set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 725 |   assumes "P \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 726 | and "\<And>T. T \<in> P \<Longrightarrow> T exposed_face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 727 | shows "\<Inter>P exposed_face_of S" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 728 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 729 |   obtain Q where "finite Q" and QsubP: "Q \<subseteq> P" "card Q \<le> DIM('a) + 2" and IntQ: "\<Inter>Q = \<Inter>P"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 730 | using Inter_faces_finite_altbound [of P S] assms [unfolded exposed_face_of] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 731 | by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 732 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 733 |   proof (cases "Q = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 734 | case True then show ?thesis | 
| 67829 
2a6ef5ba4822
Changes to complete distributive lattices due to Viorel Preoteasa
 Manuel Eberl <eberlm@in.tum.de> parents: 
67613diff
changeset | 735 | by (metis IntQ Inter_UNIV_conv(2) assms(1) assms(2) ex_in_conv) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 736 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 737 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 738 |     have "Q \<subseteq> {T. T exposed_face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 739 | using QsubP assms by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 740 |     moreover have "Q \<subseteq> {T. T exposed_face_of S} \<Longrightarrow> \<Inter>Q exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 741 | using \<open>finite Q\<close> False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 742 | apply (induction Q rule: finite_induct) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 743 | using exposed_face_of_Int apply fastforce+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 744 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 745 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 746 | by (simp add: IntQ) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 747 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 748 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 749 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 750 | proposition exposed_face_of_sums: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 751 | assumes "convex S" and "convex T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 752 |       and "F exposed_face_of {x + y | x y. x \<in> S \<and> y \<in> T}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 753 | (is "F exposed_face_of ?ST") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 754 | obtains k l | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 755 | where "k exposed_face_of S" "l exposed_face_of T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 756 |           "F = {x + y | x y. x \<in> k \<and> y \<in> l}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 757 | proof (cases "F = {}")
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 758 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 759 | using that by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 760 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 761 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 762 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 763 | proof (cases "F = ?ST") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 764 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 765 | using assms exposed_face_of_refl_eq that by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 766 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 767 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 768 |     obtain p where "p \<in> F" using \<open>F \<noteq> {}\<close> by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 769 | moreover | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 770 |     obtain u z where T: "?ST \<inter> {x. u \<bullet> x = z} face_of ?ST"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 771 |                  and S: "?ST \<subseteq> {x. u \<bullet> x \<le> z}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 772 |                  and feq: "F = ?ST \<inter> {x. u \<bullet> x = z}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 773 | using assms by (auto simp: exposed_face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 774 | ultimately obtain a0 b0 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 775 | where p: "p = a0 + b0" and "a0 \<in> S" "b0 \<in> T" and z: "u \<bullet> p = z" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 776 | by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 777 | have lez: "u \<bullet> (x + y) \<le> z" if "x \<in> S" "y \<in> T" for x y | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 778 | using S that by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 779 |     have sef: "S \<inter> {x. u \<bullet> x = u \<bullet> a0} exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 780 | apply (rule exposed_face_of_Int_supporting_hyperplane_le [OF \<open>convex S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 781 | apply (metis p z add_le_cancel_right inner_right_distrib lez [OF _ \<open>b0 \<in> T\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 782 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 783 |     have tef: "T \<inter> {x. u \<bullet> x = u \<bullet> b0} exposed_face_of T"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 784 | apply (rule exposed_face_of_Int_supporting_hyperplane_le [OF \<open>convex T\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 785 | apply (metis p z add.commute add_le_cancel_right inner_right_distrib lez [OF \<open>a0 \<in> S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 786 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 787 |     have "{x + y |x y. x \<in> S \<and> u \<bullet> x = u \<bullet> a0 \<and> y \<in> T \<and> u \<bullet> y = u \<bullet> b0} \<subseteq> F"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 788 | by (auto simp: feq) (metis inner_right_distrib p z) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 789 |     moreover have "F \<subseteq> {x + y |x y. x \<in> S \<and> u \<bullet> x = u \<bullet> a0 \<and> y \<in> T \<and> u \<bullet> y = u \<bullet> b0}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 790 | apply (auto simp: feq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 791 | apply (rename_tac x y) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 792 | apply (rule_tac x=x in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 793 | apply (rule_tac x=y in exI, simp) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 794 | using z p \<open>a0 \<in> S\<close> \<open>b0 \<in> T\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 795 | apply clarify | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 796 | apply (simp add: inner_right_distrib) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 797 | apply (metis add_le_cancel_right antisym lez [unfolded inner_right_distrib] add.commute) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 798 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 799 |     ultimately have "F = {x + y |x y. x \<in> S \<inter> {x. u \<bullet> x = u \<bullet> a0} \<and> y \<in> T \<inter> {x. u \<bullet> x = u \<bullet> b0}}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 800 | by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 801 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 802 | by (rule that [OF sef tef]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 803 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 804 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 805 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 806 | proposition exposed_face_of_parallel: | 
| 66652 | 807 | "T exposed_face_of S \<longleftrightarrow> | 
| 808 | T face_of S \<and> | |
| 809 |          (\<exists>a b. S \<subseteq> {x. a \<bullet> x \<le> b} \<and> T = S \<inter> {x. a \<bullet> x = b} \<and>
 | |
| 810 |                 (T \<noteq> {} \<longrightarrow> T \<noteq> S \<longrightarrow> a \<noteq> 0) \<and>
 | |
| 811 | (T \<noteq> S \<longrightarrow> (\<forall>w \<in> affine hull S. (w + a) \<in> affine hull S)))" | |
| 812 | (is "?lhs = ?rhs") | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 813 | proof | 
| 66652 | 814 | assume ?lhs then show ?rhs | 
| 815 | proof (clarsimp simp: exposed_face_of_def) | |
| 816 | fix a b | |
| 817 |     assume faceS: "S \<inter> {x. a \<bullet> x = b} face_of S" and Ssub: "S \<subseteq> {x. a \<bullet> x \<le> b}" 
 | |
| 818 |     show "\<exists>c d. S \<subseteq> {x. c \<bullet> x \<le> d} \<and>
 | |
| 819 |                 S \<inter> {x. a \<bullet> x = b} = S \<inter> {x. c \<bullet> x = d} \<and>
 | |
| 820 |                 (S \<inter> {x. a \<bullet> x = b} \<noteq> {} \<longrightarrow> S \<inter> {x. a \<bullet> x = b} \<noteq> S \<longrightarrow> c \<noteq> 0) \<and>
 | |
| 821 |                 (S \<inter> {x. a \<bullet> x = b} \<noteq> S \<longrightarrow> (\<forall>w \<in> affine hull S. w + c \<in> affine hull S))"
 | |
| 822 |     proof (cases "affine hull S \<inter> {x. -a \<bullet> x \<le> -b} = {} \<or> affine hull S \<subseteq> {x. - a \<bullet> x \<le> - b}")
 | |
| 823 | case True | |
| 824 | then show ?thesis | |
| 825 | proof | |
| 826 |         assume "affine hull S \<inter> {x. - a \<bullet> x \<le> - b} = {}"
 | |
| 827 | then show ?thesis | |
| 828 | apply (rule_tac x="0" in exI) | |
| 829 | apply (rule_tac x="1" in exI) | |
| 830 | using hull_subset by fastforce | |
| 831 | next | |
| 832 |       assume "affine hull S \<subseteq> {x. - a \<bullet> x \<le> - b}"
 | |
| 833 | then show ?thesis | |
| 834 | apply (rule_tac x="0" in exI) | |
| 835 | apply (rule_tac x="0" in exI) | |
| 836 | using Ssub hull_subset by fastforce | |
| 837 | qed | |
| 838 | next | |
| 839 | case False | |
| 840 | then obtain a' b' where "a' \<noteq> 0" | |
| 841 |       and le: "affine hull S \<inter> {x. a' \<bullet> x \<le> b'} = affine hull S \<inter> {x. - a \<bullet> x \<le> - b}" 
 | |
| 842 |       and eq: "affine hull S \<inter> {x. a' \<bullet> x = b'} = affine hull S \<inter> {x. - a \<bullet> x = - b}" 
 | |
| 843 | and mem: "\<And>w. w \<in> affine hull S \<Longrightarrow> w + a' \<in> affine hull S" | |
| 844 | using affine_parallel_slice affine_affine_hull by metis | |
| 845 | show ?thesis | |
| 846 | proof (intro conjI impI allI ballI exI) | |
| 69508 | 847 |       have *: "S \<subseteq> - (affine hull S \<inter> {x. P x}) \<union> affine hull S \<inter> {x. Q x} \<Longrightarrow> S \<subseteq> {x. \<not> P x \<or> Q x}" 
 | 
| 66652 | 848 | for P Q | 
| 849 | using hull_subset by fastforce | |
| 69508 | 850 |       have "S \<subseteq> {x. \<not> (a' \<bullet> x \<le> b') \<or> a' \<bullet> x = b'}"
 | 
| 66652 | 851 | apply (rule *) | 
| 852 | apply (simp only: le eq) | |
| 853 | using Ssub by auto | |
| 854 |       then show "S \<subseteq> {x. - a' \<bullet> x \<le> - b'}"
 | |
| 855 | by auto | |
| 856 |       show "S \<inter> {x. a \<bullet> x = b} = S \<inter> {x. - a' \<bullet> x = - b'}"
 | |
| 857 | using eq hull_subset [of S affine] by force | |
| 858 |       show "\<lbrakk>S \<inter> {x. a \<bullet> x = b} \<noteq> {}; S \<inter> {x. a \<bullet> x = b} \<noteq> S\<rbrakk> \<Longrightarrow> - a' \<noteq> 0"
 | |
| 859 | using \<open>a' \<noteq> 0\<close> by auto | |
| 860 | show "w + - a' \<in> affine hull S" | |
| 861 |         if "S \<inter> {x. a \<bullet> x = b} \<noteq> S" "w \<in> affine hull S" for w
 | |
| 862 | proof - | |
| 863 | have "w + 1 *\<^sub>R (w - (w + a')) \<in> affine hull S" | |
| 864 | using affine_affine_hull mem mem_affine_3_minus that(2) by blast | |
| 865 | then show ?thesis by simp | |
| 866 | qed | |
| 867 | qed | |
| 868 | qed | |
| 869 | qed | |
| 870 | next | |
| 871 | assume ?rhs then show ?lhs | |
| 872 | unfolding exposed_face_of_def by blast | |
| 873 | qed | |
| 874 | ||
| 69683 | 875 | subsection\<open>Extreme points of a set: its singleton faces\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 876 | |
| 70136 | 877 | definition\<^marker>\<open>tag important\<close> extreme_point_of :: "['a::real_vector, 'a set] \<Rightarrow> bool" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 878 | (infixr "(extreme'_point'_of)" 50) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 879 | where "x extreme_point_of S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 880 | x \<in> S \<and> (\<forall>a \<in> S. \<forall>b \<in> S. x \<notin> open_segment a b)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 881 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 882 | lemma extreme_point_of_stillconvex: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 883 |    "convex S \<Longrightarrow> (x extreme_point_of S \<longleftrightarrow> x \<in> S \<and> convex(S - {x}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 884 | by (fastforce simp add: convex_contains_segment extreme_point_of_def open_segment_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 885 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 886 | lemma face_of_singleton: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 887 |    "{x} face_of S \<longleftrightarrow> x extreme_point_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 888 | by (fastforce simp add: extreme_point_of_def face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 889 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 890 | lemma extreme_point_not_in_REL_INTERIOR: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 891 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 892 |     shows "\<lbrakk>x extreme_point_of S; S \<noteq> {x}\<rbrakk> \<Longrightarrow> x \<notin> rel_interior S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 893 | apply (simp add: face_of_singleton [symmetric]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 894 | apply (blast dest: face_of_disjoint_rel_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 895 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 896 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 897 | lemma extreme_point_not_in_interior: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 898 |     fixes S :: "'a::{real_normed_vector, perfect_space} set"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 899 | shows "x extreme_point_of S \<Longrightarrow> x \<notin> interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 900 | apply (case_tac "S = {x}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 901 | apply (simp add: empty_interior_finite) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 902 | by (meson contra_subsetD extreme_point_not_in_REL_INTERIOR interior_subset_rel_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 903 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 904 | lemma extreme_point_of_face: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 905 | "F face_of S \<Longrightarrow> v extreme_point_of F \<longleftrightarrow> v extreme_point_of S \<and> v \<in> F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 906 | by (meson empty_subsetI face_of_face face_of_singleton insert_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 907 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 908 | lemma extreme_point_of_convex_hull: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 909 | "x extreme_point_of (convex hull S) \<Longrightarrow> x \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 910 | apply (simp add: extreme_point_of_stillconvex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 911 | using hull_minimal [of S "(convex hull S) - {x}" convex]
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 912 | using hull_subset [of S convex] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 913 | apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 914 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 915 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 916 | proposition extreme_points_of_convex_hull: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 917 |    "{x. x extreme_point_of (convex hull S)} \<subseteq> S"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 918 | using extreme_point_of_convex_hull by auto | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 919 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 920 | lemma extreme_point_of_empty [simp]: "\<not> (x extreme_point_of {})"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 921 | by (simp add: extreme_point_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 922 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 923 | lemma extreme_point_of_singleton [iff]: "x extreme_point_of {a} \<longleftrightarrow> x = a"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 924 | using extreme_point_of_stillconvex by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 925 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 926 | lemma extreme_point_of_translation_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 927 | "(a + x) extreme_point_of (image (\<lambda>x. a + x) S) \<longleftrightarrow> x extreme_point_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 928 | by (auto simp: extreme_point_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 929 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 930 | lemma extreme_points_of_translation: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 931 |    "{x. x extreme_point_of (image (\<lambda>x. a + x) S)} =
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 932 |     (\<lambda>x. a + x) ` {x. x extreme_point_of S}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 933 | using extreme_point_of_translation_eq | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 934 | by auto (metis (no_types, lifting) image_iff mem_Collect_eq minus_add_cancel) | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 935 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 936 | lemma extreme_points_of_translation_subtract: | 
| 69661 | 937 |    "{x. x extreme_point_of (image (\<lambda>x. x - a) S)} =
 | 
| 938 |     (\<lambda>x. x - a) ` {x. x extreme_point_of S}"
 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 939 | using extreme_points_of_translation [of "- a" S] | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 940 | by simp | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 941 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 942 | lemma extreme_point_of_Int: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 943 | "\<lbrakk>x extreme_point_of S; x extreme_point_of T\<rbrakk> \<Longrightarrow> x extreme_point_of (S \<inter> T)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 944 | by (simp add: extreme_point_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 945 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 946 | lemma extreme_point_of_Int_supporting_hyperplane_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 947 |    "\<lbrakk>S \<inter> {x. a \<bullet> x = b} = {c}; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b\<rbrakk> \<Longrightarrow> c extreme_point_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 948 | apply (simp add: face_of_singleton [symmetric]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 949 | by (metis face_of_Int_supporting_hyperplane_le_strong convex_singleton) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 950 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 951 | lemma extreme_point_of_Int_supporting_hyperplane_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 952 |    "\<lbrakk>S \<inter> {x. a \<bullet> x = b} = {c}; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b\<rbrakk> \<Longrightarrow> c extreme_point_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 953 | apply (simp add: face_of_singleton [symmetric]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 954 | by (metis face_of_Int_supporting_hyperplane_ge_strong convex_singleton) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 955 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 956 | lemma exposed_point_of_Int_supporting_hyperplane_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 957 |    "\<lbrakk>S \<inter> {x. a \<bullet> x = b} = {c}; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<le> b\<rbrakk> \<Longrightarrow> {c} exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 958 | apply (simp add: exposed_face_of_def face_of_singleton) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 959 | apply (force simp: extreme_point_of_Int_supporting_hyperplane_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 960 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 961 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 962 | lemma exposed_point_of_Int_supporting_hyperplane_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 963 |     "\<lbrakk>S \<inter> {x. a \<bullet> x = b} = {c}; \<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b\<rbrakk> \<Longrightarrow> {c} exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 964 | using exposed_point_of_Int_supporting_hyperplane_le [of S "-a" "-b" c] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 965 | by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 966 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 967 | lemma extreme_point_of_convex_hull_insert: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 968 | "\<lbrakk>finite S; a \<notin> convex hull S\<rbrakk> \<Longrightarrow> a extreme_point_of (convex hull (insert a S))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 969 | apply (case_tac "a \<in> S") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 970 | apply (simp add: hull_inc) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 971 | using face_of_convex_hulls [of "insert a S" "{a}"]
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 972 | apply (auto simp: face_of_singleton hull_same) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 973 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 974 | |
| 69683 | 975 | subsection\<open>Facets\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 976 | |
| 70136 | 977 | definition\<^marker>\<open>tag important\<close> facet_of :: "['a::euclidean_space set, 'a set] \<Rightarrow> bool" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 978 | (infixr "(facet'_of)" 50) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 979 |   where "F facet_of S \<longleftrightarrow> F face_of S \<and> F \<noteq> {} \<and> aff_dim F = aff_dim S - 1"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 980 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 981 | lemma facet_of_empty [simp]: "\<not> S facet_of {}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 982 | by (simp add: facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 983 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 984 | lemma facet_of_irrefl [simp]: "\<not> S facet_of S " | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 985 | by (simp add: facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 986 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 987 | lemma facet_of_imp_face_of: "F facet_of S \<Longrightarrow> F face_of S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 988 | by (simp add: facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 989 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 990 | lemma facet_of_imp_subset: "F facet_of S \<Longrightarrow> F \<subseteq> S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 991 | by (simp add: face_of_imp_subset facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 992 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 993 | lemma hyperplane_facet_of_halfspace_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 994 |    "a \<noteq> 0 \<Longrightarrow> {x. a \<bullet> x = b} facet_of {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 995 | unfolding facet_of_def hyperplane_eq_empty | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 996 | by (auto simp: hyperplane_face_of_halfspace_ge hyperplane_face_of_halfspace_le | 
| 71633 | 997 | Suc_leI of_nat_diff aff_dim_halfspace_le) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 998 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 999 | lemma hyperplane_facet_of_halfspace_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1000 |     "a \<noteq> 0 \<Longrightarrow> {x. a \<bullet> x = b} facet_of {x. a \<bullet> x \<ge> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1001 | unfolding facet_of_def hyperplane_eq_empty | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1002 | by (auto simp: hyperplane_face_of_halfspace_le hyperplane_face_of_halfspace_ge | 
| 71633 | 1003 | Suc_leI of_nat_diff aff_dim_halfspace_ge) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1004 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1005 | lemma facet_of_halfspace_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1006 |     "F facet_of {x. a \<bullet> x \<le> b} \<longleftrightarrow> a \<noteq> 0 \<and> F = {x. a \<bullet> x = b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1007 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1008 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1009 | assume c: ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1010 | with c facet_of_irrefl show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1011 | by (force simp: aff_dim_halfspace_le facet_of_def face_of_halfspace_le cong: conj_cong split: if_split_asm) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1012 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1013 | assume ?rhs then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1014 | by (simp add: hyperplane_facet_of_halfspace_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1015 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1016 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1017 | lemma facet_of_halfspace_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1018 |     "F facet_of {x. a \<bullet> x \<ge> b} \<longleftrightarrow> a \<noteq> 0 \<and> F = {x. a \<bullet> x = b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1019 | using facet_of_halfspace_le [of F "-a" "-b"] by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1020 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1021 | subsection \<open>Edges: faces of affine dimension 1\<close> (*FIXME too small subsection, rearrange? *) | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1022 | |
| 70136 | 1023 | definition\<^marker>\<open>tag important\<close> edge_of :: "['a::euclidean_space set, 'a set] \<Rightarrow> bool" (infixr "(edge'_of)" 50) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1024 | where "e edge_of S \<longleftrightarrow> e face_of S \<and> aff_dim e = 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1025 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1026 | lemma edge_of_imp_subset: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1027 | "S edge_of T \<Longrightarrow> S \<subseteq> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1028 | by (simp add: edge_of_def face_of_imp_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1029 | |
| 69683 | 1030 | subsection\<open>Existence of extreme points\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1031 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1032 | proposition different_norm_3_collinear_points: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1033 | fixes a :: "'a::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1034 | assumes "x \<in> open_segment a b" "norm(a) = norm(b)" "norm(x) = norm(b)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1035 | shows False | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1036 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1037 | obtain u where "norm ((1 - u) *\<^sub>R a + u *\<^sub>R b) = norm b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1038 | and "a \<noteq> b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1039 | and u01: "0 < u" "u < 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1040 | using assms by (auto simp: open_segment_image_interval if_splits) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1041 | then have "(1 - u) *\<^sub>R a \<bullet> (1 - u) *\<^sub>R a + ((1 - u) * 2) *\<^sub>R a \<bullet> u *\<^sub>R b = | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1042 | (1 - u * u) *\<^sub>R (a \<bullet> a)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1043 | using assms by (simp add: norm_eq algebra_simps inner_commute) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1044 | then have "(1 - u) *\<^sub>R ((1 - u) *\<^sub>R a \<bullet> a + (2 * u) *\<^sub>R a \<bullet> b) = | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1045 | (1 - u) *\<^sub>R ((1 + u) *\<^sub>R (a \<bullet> a))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1046 | by (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1047 | then have "(1 - u) *\<^sub>R (a \<bullet> a) + (2 * u) *\<^sub>R (a \<bullet> b) = (1 + u) *\<^sub>R (a \<bullet> a)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1048 | using u01 by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1049 | then have "a \<bullet> b = a \<bullet> a" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1050 | using u01 by (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1051 | then have "a = b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1052 | using \<open>norm(a) = norm(b)\<close> norm_eq vector_eq by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1053 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1054 | using \<open>a \<noteq> b\<close> by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1055 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1056 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1057 | proposition extreme_point_exists_convex: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1058 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1059 |   assumes "compact S" "convex S" "S \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1060 | obtains x where "x extreme_point_of S" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1061 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1062 | obtain x where "x \<in> S" and xsup: "\<And>y. y \<in> S \<Longrightarrow> norm y \<le> norm x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1063 | using distance_attains_sup [of S 0] assms by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1064 | have False if "a \<in> S" "b \<in> S" and x: "x \<in> open_segment a b" for a b | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1065 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1066 | have noax: "norm a \<le> norm x" and nobx: "norm b \<le> norm x" using xsup that by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1067 | have "a \<noteq> b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1068 | using empty_iff open_segment_idem x by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1069 | have *: "(1 - u) * na + u * nb < norm x" if "na < norm x" "nb \<le> norm x" "0 < u" "u < 1" for na nb u | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1070 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1071 | have "(1 - u) * na + u * nb < (1 - u) * norm x + u * nb" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1072 | by (simp add: that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1073 | also have "... \<le> (1 - u) * norm x + u * norm x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1074 | by (simp add: that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1075 | finally have "(1 - u) * na + u * nb < (1 - u) * norm x + u * norm x" . | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1076 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1077 | using scaleR_collapse [symmetric, of "norm x" u] by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1078 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1079 | have "norm x < norm x" if "norm a < norm x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1080 | using x | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1081 | apply (clarsimp simp only: open_segment_image_interval \<open>a \<noteq> b\<close> if_False) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1082 | apply (rule norm_triangle_lt) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1083 | apply (simp add: norm_mult) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1084 | using * [of "norm a" "norm b"] nobx that | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1085 | apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1086 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1087 | moreover have "norm x < norm x" if "norm b < norm x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1088 | using x | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1089 | apply (clarsimp simp only: open_segment_image_interval \<open>a \<noteq> b\<close> if_False) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1090 | apply (rule norm_triangle_lt) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1091 | apply (simp add: norm_mult) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1092 | using * [of "norm b" "norm a" "1-u" for u] noax that | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1093 | apply (simp add: add.commute) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1094 | done | 
| 69508 | 1095 | ultimately have "\<not> (norm a < norm x) \<and> \<not> (norm b < norm x)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1096 | by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1097 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1098 | using different_norm_3_collinear_points noax nobx that(3) by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1099 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1100 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1101 | apply (rule_tac x=x in that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1102 | apply (force simp: extreme_point_of_def \<open>x \<in> S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1103 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1104 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1105 | |
| 69683 | 1106 | subsection\<open>Krein-Milman, the weaker form\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1107 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1108 | proposition Krein_Milman: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1109 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1110 | assumes "compact S" "convex S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1111 |     shows "S = closure(convex hull {x. x extreme_point_of S})"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1112 | proof (cases "S = {}")
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1113 | case True then show ?thesis by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1114 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1115 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1116 | have "closed S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1117 | by (simp add: \<open>compact S\<close> compact_imp_closed) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1118 |   have "closure (convex hull {x. x extreme_point_of S}) \<subseteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1119 | apply (rule closure_minimal [OF hull_minimal \<open>closed S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1120 | using assms | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1121 | apply (auto simp: extreme_point_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1122 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1123 |   moreover have "u \<in> closure (convex hull {x. x extreme_point_of S})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1124 | if "u \<in> S" for u | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1125 | proof (rule ccontr) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1126 |     assume unot: "u \<notin> closure(convex hull {x. x extreme_point_of S})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1127 | then obtain a b where "a \<bullet> u < b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1128 |           and ab: "\<And>x. x \<in> closure(convex hull {x. x extreme_point_of S}) \<Longrightarrow> b < a \<bullet> x"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1129 |       using separating_hyperplane_closed_point [of "closure(convex hull {x. x extreme_point_of S})"]
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1130 | by blast | 
| 67399 | 1131 | have "continuous_on S ((\<bullet>) a)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1132 | by (rule continuous_intros)+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1133 | then obtain m where "m \<in> S" and m: "\<And>y. y \<in> S \<Longrightarrow> a \<bullet> m \<le> a \<bullet> y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1134 | using continuous_attains_inf [of S "\<lambda>x. a \<bullet> x"] \<open>compact S\<close> \<open>u \<in> S\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1135 | by auto | 
| 63148 | 1136 |     define T where "T = S \<inter> {x. a \<bullet> x = a \<bullet> m}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1137 | have "m \<in> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1138 | by (simp add: T_def \<open>m \<in> S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1139 | moreover have "compact T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1140 | by (simp add: T_def compact_Int_closed [OF \<open>compact S\<close> closed_hyperplane]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1141 | moreover have "convex T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1142 | by (simp add: T_def convex_Int [OF \<open>convex S\<close> convex_hyperplane]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1143 | ultimately obtain v where v: "v extreme_point_of T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1144 | using extreme_point_exists_convex [of T] by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1145 |     then have "{v} face_of T"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1146 | by (simp add: face_of_singleton) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1147 | also have "T face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1148 | by (simp add: T_def m face_of_Int_supporting_hyperplane_ge [OF \<open>convex S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1149 | finally have "v extreme_point_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1150 | by (simp add: face_of_singleton) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1151 | then have "b < a \<bullet> v" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1152 | using closure_subset by (simp add: closure_hull hull_inc ab) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1153 | then show False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1154 |       using \<open>a \<bullet> u < b\<close> \<open>{v} face_of T\<close> face_of_imp_subset m T_def that by fastforce
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1155 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1156 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1157 | by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1158 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1159 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1160 | text\<open>Now the sharper form.\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1161 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1162 | lemma Krein_Milman_Minkowski_aux: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1163 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1164 | assumes n: "dim S = n" and S: "compact S" "convex S" "0 \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1165 |     shows "0 \<in> convex hull {x. x extreme_point_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1166 | using n S | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1167 | proof (induction n arbitrary: S rule: less_induct) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1168 | case (less n S) show ?case | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1169 | proof (cases "0 \<in> rel_interior S") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1170 | case True with Krein_Milman show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1171 | by (metis subsetD convex_convex_hull convex_rel_interior_closure less.prems(2) less.prems(3) rel_interior_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1172 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1173 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1174 |     have "rel_interior S \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1175 | by (simp add: rel_interior_convex_nonempty_aux less) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1176 | then obtain c where c: "c \<in> rel_interior S" by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1177 | obtain a where "a \<noteq> 0" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1178 | and le_ay: "\<And>y. y \<in> S \<Longrightarrow> a \<bullet> 0 \<le> a \<bullet> y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1179 | and less_ay: "\<And>y. y \<in> rel_interior S \<Longrightarrow> a \<bullet> 0 < a \<bullet> y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1180 | by (blast intro: supporting_hyperplane_rel_boundary intro!: less False) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1181 |     have face: "S \<inter> {x. a \<bullet> x = 0} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1182 | apply (rule face_of_Int_supporting_hyperplane_ge [OF \<open>convex S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1183 | using le_ay by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1184 |     then have co: "compact (S \<inter> {x. a \<bullet> x = 0})" "convex (S \<inter> {x. a \<bullet> x = 0})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1185 | using less.prems by (blast intro: face_of_imp_compact face_of_imp_convex)+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1186 |     have "a \<bullet> y = 0" if "y \<in> span (S \<inter> {x. a \<bullet> x = 0})" for y
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1187 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1188 |       have "y \<in> span {x. a \<bullet> x = 0}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1189 | by (metis inf.cobounded2 span_mono subsetCE that) | 
| 63469 
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
 paulson <lp15@cam.ac.uk> parents: 
63265diff
changeset | 1190 | then show ?thesis | 
| 
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
 paulson <lp15@cam.ac.uk> parents: 
63265diff
changeset | 1191 | by (blast intro: span_induct [OF _ subspace_hyperplane]) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1192 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1193 |     then have "dim (S \<inter> {x. a \<bullet> x = 0}) < n"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1194 | by (metis (no_types) less_ay c subsetD dim_eq_span inf.strict_order_iff | 
| 68074 | 1195 | inf_le1 \<open>dim S = n\<close> not_le rel_interior_subset span_0 span_base) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1196 |     then have "0 \<in> convex hull {x. x extreme_point_of (S \<inter> {x. a \<bullet> x = 0})}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1197 | by (rule less.IH) (auto simp: co less.prems) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1198 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1199 |       by (metis (mono_tags, lifting) Collect_mono_iff \<open>S \<inter> {x. a \<bullet> x = 0} face_of S\<close> extreme_point_of_face hull_mono subset_iff)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1200 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1201 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1202 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1203 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1204 | theorem Krein_Milman_Minkowski: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1205 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1206 | assumes "compact S" "convex S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1207 |     shows "S = convex hull {x. x extreme_point_of S}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1208 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1209 |   show "S \<subseteq> convex hull {x. x extreme_point_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1210 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1211 | fix a assume [simp]: "a \<in> S" | 
| 67399 | 1212 | have 1: "compact ((+) (- a) ` S)" | 
| 69661 | 1213 | by (simp add: \<open>compact S\<close> compact_translation_subtract cong: image_cong_simp) | 
| 67399 | 1214 | have 2: "convex ((+) (- a) ` S)" | 
| 69661 | 1215 | by (simp add: \<open>convex S\<close> compact_translation_subtract) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1216 |     show a_invex: "a \<in> convex hull {x. x extreme_point_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1217 | using Krein_Milman_Minkowski_aux [OF refl 1 2] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1218 | convex_hull_translation [of "-a"] | 
| 69661 | 1219 | by (auto simp: extreme_points_of_translation_subtract translation_assoc cong: image_cong_simp) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1220 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1221 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1222 |   show "convex hull {x. x extreme_point_of S} \<subseteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1223 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1224 |     have "{a. a extreme_point_of S} \<subseteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1225 | using extreme_point_of_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1226 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1227 | by (simp add: \<open>convex S\<close> hull_minimal) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1228 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1229 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1230 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1231 | |
| 69683 | 1232 | subsection\<open>Applying it to convex hulls of explicitly indicated finite sets\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1233 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1234 | corollary Krein_Milman_polytope: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1235 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1236 | shows | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1237 | "finite S | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1238 | \<Longrightarrow> convex hull S = | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1239 |            convex hull {x. x extreme_point_of (convex hull S)}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1240 | by (simp add: Krein_Milman_Minkowski finite_imp_compact_convex_hull) | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1241 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1242 | lemma extreme_points_of_convex_hull_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1243 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1244 | shows | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1245 | "\<lbrakk>compact S; \<And>T. T \<subset> S \<Longrightarrow> convex hull T \<noteq> convex hull S\<rbrakk> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1246 |         \<Longrightarrow> {x. x extreme_point_of (convex hull S)} = S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1247 | by (metis (full_types) Krein_Milman_Minkowski compact_convex_hull convex_convex_hull extreme_points_of_convex_hull psubsetI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1248 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1249 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1250 | lemma extreme_point_of_convex_hull_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1251 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1252 | shows | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1253 | "\<lbrakk>compact S; \<And>T. T \<subset> S \<Longrightarrow> convex hull T \<noteq> convex hull S\<rbrakk> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1254 | \<Longrightarrow> (x extreme_point_of (convex hull S) \<longleftrightarrow> x \<in> S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1255 | using extreme_points_of_convex_hull_eq by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1256 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1257 | lemma extreme_point_of_convex_hull_convex_independent: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1258 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1259 |   assumes "compact S" and S: "\<And>a. a \<in> S \<Longrightarrow> a \<notin> convex hull (S - {a})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1260 | shows "(x extreme_point_of (convex hull S) \<longleftrightarrow> x \<in> S)" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1261 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1262 | have "convex hull T \<noteq> convex hull S" if "T \<subset> S" for T | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1263 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1264 | obtain a where "T \<subseteq> S" "a \<in> S" "a \<notin> T" using \<open>T \<subset> S\<close> by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1265 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1266 | by (metis (full_types) Diff_eq_empty_iff Diff_insert0 S hull_mono hull_subset insert_Diff_single subsetCE) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1267 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1268 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1269 | by (rule extreme_point_of_convex_hull_eq [OF \<open>compact S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1270 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1271 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1272 | lemma extreme_point_of_convex_hull_affine_independent: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1273 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1274 | shows | 
| 69508 | 1275 | "\<not> affine_dependent S | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1276 | \<Longrightarrow> (x extreme_point_of (convex hull S) \<longleftrightarrow> x \<in> S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1277 | by (metis aff_independent_finite affine_dependent_def affine_hull_convex_hull extreme_point_of_convex_hull_convex_independent finite_imp_compact hull_inc) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1278 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1279 | text\<open>Elementary proofs exist, not requiring Euclidean spaces and all this development\<close> | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1280 | lemma extreme_point_of_convex_hull_2: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1281 | fixes x :: "'a::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1282 |   shows "x extreme_point_of (convex hull {a,b}) \<longleftrightarrow> x = a \<or> x = b"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1283 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1284 |   have "x extreme_point_of (convex hull {a,b}) \<longleftrightarrow> x \<in> {a,b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1285 | by (intro extreme_point_of_convex_hull_affine_independent affine_independent_2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1286 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1287 | by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1288 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1289 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1290 | lemma extreme_point_of_segment: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1291 | fixes x :: "'a::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1292 | shows | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1293 | "x extreme_point_of closed_segment a b \<longleftrightarrow> x = a \<or> x = b" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1294 | by (simp add: extreme_point_of_convex_hull_2 segment_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1295 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1296 | lemma face_of_convex_hull_subset: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1297 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1298 | assumes "compact S" and T: "T face_of (convex hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1299 | obtains s' where "s' \<subseteq> S" "T = convex hull s'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1300 | apply (rule_tac s' = "{x. x extreme_point_of T}" in that)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1301 | using T extreme_point_of_convex_hull extreme_point_of_face apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1302 | by (metis (no_types) Krein_Milman_Minkowski assms compact_convex_hull convex_convex_hull face_of_imp_compact face_of_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1303 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1304 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1305 | lemma face_of_convex_hull_aux: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1306 | assumes eq: "x *\<^sub>R p = u *\<^sub>R a + v *\<^sub>R b + w *\<^sub>R c" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1307 | and x: "u + v + w = x" "x \<noteq> 0" and S: "affine S" "a \<in> S" "b \<in> S" "c \<in> S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1308 | shows "p \<in> S" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1309 | proof - | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1310 | have "p = (u *\<^sub>R a + v *\<^sub>R b + w *\<^sub>R c) /\<^sub>R x" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1311 | by (metis \<open>x \<noteq> 0\<close> eq mult.commute right_inverse scaleR_one scaleR_scaleR) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1312 |   moreover have "affine hull {a,b,c} \<subseteq> S"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1313 | by (simp add: S hull_minimal) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1314 |   moreover have "(u *\<^sub>R a + v *\<^sub>R b + w *\<^sub>R c) /\<^sub>R x \<in> affine hull {a,b,c}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1315 | apply (simp add: affine_hull_3) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1316 | apply (rule_tac x="u/x" in exI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1317 | apply (rule_tac x="v/x" in exI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1318 | apply (rule_tac x="w/x" in exI) | 
| 71633 | 1319 | using x apply (auto simp: field_split_simps) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1320 | done | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1321 | ultimately show ?thesis by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1322 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1323 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1324 | proposition face_of_convex_hull_insert_eq: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1325 | fixes a :: "'a :: euclidean_space" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1326 | assumes "finite S" and a: "a \<notin> affine hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1327 | shows "(F face_of (convex hull (insert a S)) \<longleftrightarrow> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1328 | F face_of (convex hull S) \<or> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1329 | (\<exists>F'. F' face_of (convex hull S) \<and> F = convex hull (insert a F')))" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1330 | (is "F face_of ?CAS \<longleftrightarrow> _") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1331 | proof safe | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1332 | assume F: "F face_of ?CAS" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1333 | and *: "\<nexists>F'. F' face_of convex hull S \<and> F = convex hull insert a F'" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1334 | obtain T where T: "T \<subseteq> insert a S" and FeqT: "F = convex hull T" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1335 | by (metis F \<open>finite S\<close> compact_insert finite_imp_compact face_of_convex_hull_subset) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1336 | show "F face_of convex hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1337 | proof (cases "a \<in> T") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1338 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1339 | have "F = convex hull insert a (convex hull T \<inter> convex hull S)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1340 | proof | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1341 | have "T \<subseteq> insert a (convex hull T \<inter> convex hull S)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1342 | using T hull_subset by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1343 | then show "F \<subseteq> convex hull insert a (convex hull T \<inter> convex hull S)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1344 | by (simp add: FeqT hull_mono) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1345 | show "convex hull insert a (convex hull T \<inter> convex hull S) \<subseteq> F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1346 | apply (rule hull_minimal) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1347 | using True by (auto simp: \<open>F = convex hull T\<close> hull_inc) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1348 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1349 | moreover have "convex hull T \<inter> convex hull S face_of convex hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1350 | by (metis F FeqT convex_convex_hull face_of_slice hull_mono inf.absorb_iff2 subset_insertI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1351 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1352 | using * by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1353 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1354 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1355 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1356 | by (metis FeqT F T face_of_subset hull_mono subset_insert subset_insertI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1357 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1358 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1359 | assume "F face_of convex hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1360 | show "F face_of ?CAS" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1361 | by (simp add: \<open>F face_of convex hull S\<close> a face_of_convex_hull_insert \<open>finite S\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1362 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1363 | fix F | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1364 | assume F: "F face_of convex hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1365 | show "convex hull insert a F face_of ?CAS" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1366 |   proof (cases "S = {}")
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1367 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1368 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1369 | using F face_of_affine_eq by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1370 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1371 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1372 | have anotc: "a \<notin> convex hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1373 | by (metis (no_types) a affine_hull_convex_hull hull_inc) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1374 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1375 |     proof (cases "F = {}")
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1376 | case True show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1377 |         using anotc by (simp add: \<open>F = {}\<close> \<open>finite S\<close> extreme_point_of_convex_hull_insert face_of_singleton)
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1378 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1379 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1380 | have "convex hull insert a F \<subseteq> ?CAS" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1381 | by (simp add: F a \<open>finite S\<close> convex_hull_subset face_of_convex_hull_insert face_of_imp_subset hull_inc) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1382 | moreover | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1383 | have "(\<exists>y v. (1 - ub) *\<^sub>R a + ub *\<^sub>R b = (1 - v) *\<^sub>R a + v *\<^sub>R y \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1384 | 0 \<le> v \<and> v \<le> 1 \<and> y \<in> F) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1385 | (\<exists>x u. (1 - uc) *\<^sub>R a + uc *\<^sub>R c = (1 - u) *\<^sub>R a + u *\<^sub>R x \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1386 | 0 \<le> u \<and> u \<le> 1 \<and> x \<in> F)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1387 | if *: "(1 - ux) *\<^sub>R a + ux *\<^sub>R x | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1388 | \<in> open_segment ((1 - ub) *\<^sub>R a + ub *\<^sub>R b) ((1 - uc) *\<^sub>R a + uc *\<^sub>R c)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1389 | and "0 \<le> ub" "ub \<le> 1" "0 \<le> uc" "uc \<le> 1" "0 \<le> ux" "ux \<le> 1" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1390 | and b: "b \<in> convex hull S" and c: "c \<in> convex hull S" and "x \<in> F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1391 | for b c ub uc ux x | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1392 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1393 | obtain v where ne: "(1 - ub) *\<^sub>R a + ub *\<^sub>R b \<noteq> (1 - uc) *\<^sub>R a + uc *\<^sub>R c" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1394 | and eq: "(1 - ux) *\<^sub>R a + ux *\<^sub>R x = | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1395 | (1 - v) *\<^sub>R ((1 - ub) *\<^sub>R a + ub *\<^sub>R b) + v *\<^sub>R ((1 - uc) *\<^sub>R a + uc *\<^sub>R c)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1396 | and "0 < v" "v < 1" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1397 | using * by (auto simp: in_segment) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1398 | then have 0: "((1 - ux) - ((1 - v) * (1 - ub) + v * (1 - uc))) *\<^sub>R a + | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1399 | (ux *\<^sub>R x - (((1 - v) * ub) *\<^sub>R b + (v * uc) *\<^sub>R c)) = 0" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1400 | by (auto simp: algebra_simps) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1401 | then have "((1 - ux) - ((1 - v) * (1 - ub) + v * (1 - uc))) *\<^sub>R a = | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1402 | ((1 - v) * ub) *\<^sub>R b + (v * uc) *\<^sub>R c + (-ux) *\<^sub>R x" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1403 | by (auto simp: algebra_simps) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1404 | then have "a \<in> affine hull S" if "1 - ux - ((1 - v) * (1 - ub) + v * (1 - uc)) \<noteq> 0" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1405 | apply (rule face_of_convex_hull_aux) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1406 | using b c that apply (auto simp: algebra_simps) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1407 | using F convex_hull_subset_affine_hull face_of_imp_subset \<open>x \<in> F\<close> apply blast+ | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1408 | done | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1409 | then have "1 - ux - ((1 - v) * (1 - ub) + v * (1 - uc)) = 0" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1410 | using a by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1411 | with 0 have equx: "(1 - v) * ub + v * uc = ux" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1412 | and uxx: "ux *\<^sub>R x = (((1 - v) * ub) *\<^sub>R b + (v * uc) *\<^sub>R c)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1413 | by auto (auto simp: algebra_simps) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1414 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1415 | proof (cases "uc = 0") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1416 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1417 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1418 | using equx 0 \<open>0 \<le> ub\<close> \<open>ub \<le> 1\<close> \<open>v < 1\<close> \<open>x \<in> F\<close> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1419 | apply (auto simp: algebra_simps) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1420 | apply (rule_tac x=x in exI, simp) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1421 | apply (rule_tac x=ub in exI, auto) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1422 | apply (metis add.left_neutral diff_eq_eq less_irrefl mult.commute mult_cancel_right1 real_vector.scale_cancel_left real_vector.scale_left_diff_distrib) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1423 | using \<open>x \<in> F\<close> \<open>uc \<le> 1\<close> apply blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1424 | done | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1425 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1426 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1427 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1428 | proof (cases "ub = 0") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1429 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1430 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1431 | using equx 0 \<open>0 \<le> uc\<close> \<open>uc \<le> 1\<close> \<open>0 < v\<close> \<open>x \<in> F\<close> \<open>uc \<noteq> 0\<close> by (force simp: algebra_simps) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1432 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1433 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1434 | then have "0 < ub" "0 < uc" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1435 | using \<open>uc \<noteq> 0\<close> \<open>0 \<le> ub\<close> \<open>0 \<le> uc\<close> by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1436 | then have "ux \<noteq> 0" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1437 | by (metis \<open>0 < v\<close> \<open>v < 1\<close> diff_ge_0_iff_ge dual_order.strict_implies_order equx leD le_add_same_cancel2 zero_le_mult_iff zero_less_mult_iff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1438 | have "b \<in> F \<and> c \<in> F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1439 | proof (cases "b = c") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1440 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1441 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1442 | by (metis \<open>ux \<noteq> 0\<close> equx real_vector.scale_cancel_left scaleR_add_left uxx \<open>x \<in> F\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1443 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1444 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1445 | have "x = (((1 - v) * ub) *\<^sub>R b + (v * uc) *\<^sub>R c) /\<^sub>R ux" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1446 | by (metis \<open>ux \<noteq> 0\<close> uxx mult.commute right_inverse scaleR_one scaleR_scaleR) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1447 | also have "... = (1 - v * uc / ux) *\<^sub>R b + (v * uc / ux) *\<^sub>R c" | 
| 71633 | 1448 | using \<open>ux \<noteq> 0\<close> equx apply (auto simp: field_split_simps) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1449 | by (metis add.commute add_diff_eq add_divide_distrib diff_add_cancel scaleR_add_left) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1450 | finally have "x = (1 - v * uc / ux) *\<^sub>R b + (v * uc / ux) *\<^sub>R c" . | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1451 | then have "x \<in> open_segment b c" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1452 | apply (simp add: in_segment \<open>b \<noteq> c\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1453 | apply (rule_tac x="(v * uc) / ux" in exI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1454 | using \<open>0 \<le> ux\<close> \<open>ux \<noteq> 0\<close> \<open>0 < uc\<close> \<open>0 < v\<close> \<open>0 < ub\<close> \<open>v < 1\<close> equx | 
| 71633 | 1455 | apply (force simp: field_split_simps) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1456 | done | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1457 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1458 | by (rule face_ofD [OF F _ b c \<open>x \<in> F\<close>]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1459 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1460 | with \<open>0 \<le> ub\<close> \<open>ub \<le> 1\<close> \<open>0 \<le> uc\<close> \<open>uc \<le> 1\<close> show ?thesis by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1461 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1462 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1463 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1464 | moreover have "convex hull F = F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1465 | by (meson F convex_hull_eq face_of_imp_convex) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1466 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1467 |         unfolding face_of_def by (fastforce simp: convex_hull_insert_alt \<open>S \<noteq> {}\<close> \<open>F \<noteq> {}\<close>)
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1468 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1469 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1470 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1471 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1472 | lemma face_of_convex_hull_insert2: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1473 | fixes a :: "'a :: euclidean_space" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1474 | assumes S: "finite S" and a: "a \<notin> affine hull S" and F: "F face_of convex hull S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1475 | shows "convex hull (insert a F) face_of convex hull (insert a S)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1476 | by (metis F face_of_convex_hull_insert_eq [OF S a]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1477 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1478 | proposition face_of_convex_hull_affine_independent: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1479 | fixes S :: "'a::euclidean_space set" | 
| 69508 | 1480 | assumes "\<not> affine_dependent S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1481 | shows "(T face_of (convex hull S) \<longleftrightarrow> (\<exists>c. c \<subseteq> S \<and> T = convex hull c))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1482 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1483 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1484 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1485 | then show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1486 | by (meson \<open>T face_of convex hull S\<close> aff_independent_finite assms face_of_convex_hull_subset finite_imp_compact) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1487 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1488 | assume ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1489 | then obtain c where "c \<subseteq> S" and T: "T = convex hull c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1490 | by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1491 |   have "affine hull c \<inter> affine hull (S - c) = {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1492 | apply (rule disjoint_affine_hull [OF assms \<open>c \<subseteq> S\<close>], auto) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1493 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1494 |   then have "affine hull c \<inter> convex hull (S - c) = {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1495 | using convex_hull_subset_affine_hull by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1496 | then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1497 | by (metis face_of_convex_hulls \<open>c \<subseteq> S\<close> aff_independent_finite assms T) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1498 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1499 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1500 | lemma facet_of_convex_hull_affine_independent: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1501 | fixes S :: "'a::euclidean_space set" | 
| 69508 | 1502 | assumes "\<not> affine_dependent S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1503 | shows "T facet_of (convex hull S) \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1504 |            T \<noteq> {} \<and> (\<exists>u. u \<in> S \<and> T = convex hull (S - {u}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1505 | (is "?lhs = ?rhs") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1506 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1507 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1508 |   then have "T face_of (convex hull S)" "T \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1509 | and afft: "aff_dim T = aff_dim (convex hull S) - 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1510 | by (auto simp: facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1511 | then obtain c where "c \<subseteq> S" and c: "T = convex hull c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1512 | by (auto simp: face_of_convex_hull_affine_independent [OF assms]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1513 | then have affs: "aff_dim S = aff_dim c + 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1514 | by (metis aff_dim_convex_hull afft eq_diff_eq) | 
| 69508 | 1515 | have "\<not> affine_dependent c" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1516 | using \<open>c \<subseteq> S\<close> affine_dependent_subset assms by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1517 | with affs have "card (S - c) = 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1518 | apply (simp add: aff_dim_affine_independent [symmetric] aff_dim_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1519 | by (metis aff_dim_affine_independent aff_independent_finite One_nat_def \<open>c \<subseteq> S\<close> add.commute | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1520 | add_diff_cancel_right' assms card_Diff_subset card_mono of_nat_1 of_nat_diff of_nat_eq_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1521 | then obtain u where u: "u \<in> S - c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1522 | by (metis DiffI \<open>c \<subseteq> S\<close> aff_independent_finite assms cancel_comm_monoid_add_class.diff_cancel | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1523 | card_Diff_subset subsetI subset_antisym zero_neq_one) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1524 | then have u: "S = insert u c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1525 | by (metis Diff_subset \<open>c \<subseteq> S\<close> \<open>card (S - c) = 1\<close> card_1_singletonE double_diff insert_Diff insert_subset singletonD) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1526 |   have "T = convex hull (c - {u})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1527 | by (metis Diff_empty Diff_insert0 \<open>T facet_of convex hull S\<close> c facet_of_irrefl insert_absorb u) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1528 |   with \<open>T \<noteq> {}\<close> show ?rhs
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1529 | using c u by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1530 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1531 | assume ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1532 |   then obtain u where "T \<noteq> {}" "u \<in> S" and u: "T = convex hull (S - {u})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1533 | by (force simp: facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1534 |   then have "\<not> S \<subseteq> {u}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1535 |     using \<open>T \<noteq> {}\<close> u by auto
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1536 |   have [simp]: "aff_dim (convex hull (S - {u})) = aff_dim (convex hull S) - 1"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1537 | using assms \<open>u \<in> S\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1538 | apply (simp add: aff_dim_convex_hull affine_dependent_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1539 | apply (drule bspec, assumption) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1540 | by (metis add_diff_cancel_right' aff_dim_insert insert_Diff [of u S]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1541 | show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1542 | apply (subst u) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1543 |     apply (simp add: \<open>\<not> S \<subseteq> {u}\<close> facet_of_def face_of_convex_hull_affine_independent [OF assms], blast)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1544 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1545 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1546 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1547 | lemma facet_of_convex_hull_affine_independent_alt: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1548 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1549 | shows | 
| 69508 | 1550 | "\<not>affine_dependent S | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1551 | \<Longrightarrow> (T facet_of (convex hull S) \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1552 |              2 \<le> card S \<and> (\<exists>u. u \<in> S \<and> T = convex hull (S - {u})))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1553 | apply (simp add: facet_of_convex_hull_affine_independent) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1554 | apply (auto simp: Set.subset_singleton_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1555 | apply (metis Diff_cancel Int_empty_right Int_insert_right_if1 aff_independent_finite card_eq_0_iff card_insert_if card_mono card_subset_eq convex_hull_eq_empty eq_iff equals0D finite_insert finite_subset inf.absorb_iff2 insert_absorb insert_not_empty not_less_eq_eq numeral_2_eq_2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1556 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1557 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1558 | lemma segment_face_of: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1559 | assumes "(closed_segment a b) face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1560 | shows "a extreme_point_of S" "b extreme_point_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1561 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1562 |   have as: "{a} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1563 | by (metis (no_types) assms convex_hull_singleton empty_iff extreme_point_of_convex_hull_insert face_of_face face_of_singleton finite.emptyI finite.insertI insert_absorb insert_iff segment_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1564 |   moreover have "{b} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1565 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1566 |     have "b \<in> convex hull {a} \<or> b extreme_point_of convex hull {b, a}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1567 | by (meson extreme_point_of_convex_hull_insert finite.emptyI finite.insertI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1568 |     moreover have "closed_segment a b = convex hull {b, a}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1569 | using closed_segment_commute segment_convex_hull by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1570 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1571 | by (metis as assms face_of_face convex_hull_singleton empty_iff face_of_singleton insertE) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1572 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1573 | ultimately show "a extreme_point_of S" "b extreme_point_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1574 | using face_of_singleton by blast+ | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1575 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1576 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1577 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1578 | proposition Krein_Milman_frontier: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1579 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1580 | assumes "convex S" "compact S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1581 | shows "S = convex hull (frontier S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1582 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1583 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1584 |   have "?lhs \<subseteq> convex hull {x. x extreme_point_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1585 | using Krein_Milman_Minkowski assms by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1586 | also have "... \<subseteq> ?rhs" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1587 | apply (rule hull_mono) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1588 | apply (auto simp: frontier_def extreme_point_not_in_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1589 | using closure_subset apply (force simp: extreme_point_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1590 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1591 | finally show "?lhs \<subseteq> ?rhs" . | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1592 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1593 | have "?rhs \<subseteq> convex hull S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1594 | by (metis Diff_subset \<open>compact S\<close> closure_closed compact_eq_bounded_closed frontier_def hull_mono) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1595 | also have "... \<subseteq> ?lhs" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1596 | by (simp add: \<open>convex S\<close> hull_same) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1597 | finally show "?rhs \<subseteq> ?lhs" . | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1598 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1599 | |
| 69683 | 1600 | subsection\<open>Polytopes\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1601 | |
| 70136 | 1602 | definition\<^marker>\<open>tag important\<close> polytope where | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1603 | "polytope S \<equiv> \<exists>v. finite v \<and> S = convex hull v" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1604 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1605 | lemma polytope_translation_eq: "polytope (image (\<lambda>x. a + x) S) \<longleftrightarrow> polytope S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1606 | apply (simp add: polytope_def, safe) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1607 | apply (metis convex_hull_translation finite_imageI translation_galois) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1608 | by (metis convex_hull_translation finite_imageI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1609 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1610 | lemma polytope_linear_image: "\<lbrakk>linear f; polytope p\<rbrakk> \<Longrightarrow> polytope(image f p)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1611 | unfolding polytope_def using convex_hull_linear_image by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1612 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1613 | lemma polytope_empty: "polytope {}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1614 | using convex_hull_empty polytope_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1615 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1616 | lemma polytope_convex_hull: "finite S \<Longrightarrow> polytope(convex hull S)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1617 | using polytope_def by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1618 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1619 | lemma polytope_Times: "\<lbrakk>polytope S; polytope T\<rbrakk> \<Longrightarrow> polytope(S \<times> T)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1620 | unfolding polytope_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1621 | by (metis finite_cartesian_product convex_hull_Times) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1622 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1623 | lemma face_of_polytope_polytope: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1624 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1625 | shows "\<lbrakk>polytope S; F face_of S\<rbrakk> \<Longrightarrow> polytope F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1626 | unfolding polytope_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1627 | by (meson face_of_convex_hull_subset finite_imp_compact finite_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1628 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1629 | lemma finite_polytope_faces: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1630 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1631 | assumes "polytope S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1632 |   shows "finite {F. F face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1633 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1634 | obtain v where "finite v" "S = convex hull v" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1635 | using assms polytope_def by auto | 
| 67399 | 1636 |   have "finite ((hull) convex ` {T. T \<subseteq> v})"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1637 | by (simp add: \<open>finite v\<close>) | 
| 67399 | 1638 |   moreover have "{F. F face_of S} \<subseteq> ((hull) convex ` {T. T \<subseteq> v})"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1639 | by (metis (no_types, lifting) \<open>finite v\<close> \<open>S = convex hull v\<close> face_of_convex_hull_subset finite_imp_compact image_eqI mem_Collect_eq subsetI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1640 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1641 | by (blast intro: finite_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1642 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1643 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1644 | lemma finite_polytope_facets: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1645 | assumes "polytope S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1646 |   shows "finite {T. T facet_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1647 | by (simp add: assms facet_of_def finite_polytope_faces) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1648 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1649 | lemma polytope_scaling: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1650 | assumes "polytope S" shows "polytope (image (\<lambda>x. c *\<^sub>R x) S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1651 | by (simp add: assms polytope_linear_image) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1652 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1653 | lemma polytope_imp_compact: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1654 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1655 | shows "polytope S \<Longrightarrow> compact S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1656 | by (metis finite_imp_compact_convex_hull polytope_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1657 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1658 | lemma polytope_imp_convex: "polytope S \<Longrightarrow> convex S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1659 | by (metis convex_convex_hull polytope_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1660 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1661 | lemma polytope_imp_closed: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1662 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1663 | shows "polytope S \<Longrightarrow> closed S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1664 | by (simp add: compact_imp_closed polytope_imp_compact) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1665 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1666 | lemma polytope_imp_bounded: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1667 | fixes S :: "'a::real_normed_vector set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1668 | shows "polytope S \<Longrightarrow> bounded S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1669 | by (simp add: compact_imp_bounded polytope_imp_compact) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1670 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1671 | lemma polytope_interval: "polytope(cbox a b)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1672 | unfolding polytope_def by (meson closed_interval_as_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1673 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1674 | lemma polytope_sing: "polytope {a}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1675 | using polytope_def by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1676 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1677 | lemma face_of_polytope_insert: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1678 | "\<lbrakk>polytope S; a \<notin> affine hull S; F face_of S\<rbrakk> \<Longrightarrow> F face_of convex hull (insert a S)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1679 | by (metis (no_types, lifting) affine_hull_convex_hull face_of_convex_hull_insert hull_insert polytope_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1680 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1681 | proposition face_of_polytope_insert2: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1682 | fixes a :: "'a :: euclidean_space" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1683 | assumes "polytope S" "a \<notin> affine hull S" "F face_of S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1684 | shows "convex hull (insert a F) face_of convex hull (insert a S)" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1685 | proof - | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1686 | obtain V where "finite V" "S = convex hull V" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1687 | using assms by (auto simp: polytope_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1688 | then have "convex hull (insert a F) face_of convex hull (insert a V)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1689 | using affine_hull_convex_hull assms face_of_convex_hull_insert2 by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1690 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1691 | by (metis \<open>S = convex hull V\<close> hull_insert) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1692 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 1693 | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1694 | |
| 69683 | 1695 | subsection\<open>Polyhedra\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1696 | |
| 70136 | 1697 | definition\<^marker>\<open>tag important\<close> polyhedron where | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1698 | "polyhedron S \<equiv> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1699 | \<exists>F. finite F \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1700 | S = \<Inter> F \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1701 |             (\<forall>h \<in> F. \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1702 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1703 | lemma polyhedron_Int [intro,simp]: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1704 | "\<lbrakk>polyhedron S; polyhedron T\<rbrakk> \<Longrightarrow> polyhedron (S \<inter> T)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1705 | apply (simp add: polyhedron_def, clarify) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1706 | apply (rename_tac F G) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1707 | apply (rule_tac x="F \<union> G" in exI, auto) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1708 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1709 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1710 | lemma polyhedron_UNIV [iff]: "polyhedron UNIV" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1711 | unfolding polyhedron_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1712 |   by (rule_tac x="{}" in exI) auto
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1713 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1714 | lemma polyhedron_Inter [intro,simp]: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1715 | "\<lbrakk>finite F; \<And>S. S \<in> F \<Longrightarrow> polyhedron S\<rbrakk> \<Longrightarrow> polyhedron(\<Inter>F)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1716 | by (induction F rule: finite_induct) auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1717 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1718 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1719 | lemma polyhedron_empty [iff]: "polyhedron ({} :: 'a :: euclidean_space set)"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1720 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1721 | have "\<exists>a. a \<noteq> 0 \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1722 |              (\<exists>b. {x. (SOME i. i \<in> Basis) \<bullet> x \<le> - 1} = {x. a \<bullet> x \<le> b})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1723 | by (rule_tac x="(SOME i. i \<in> Basis)" in exI) (force simp: SOME_Basis nonzero_Basis) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1724 | moreover have "\<exists>a b. a \<noteq> 0 \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1725 |                        {x. - (SOME i. i \<in> Basis) \<bullet> x \<le> - 1} = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1726 | apply (rule_tac x="-(SOME i. i \<in> Basis)" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1727 | apply (rule_tac x="-1" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1728 | apply (simp add: SOME_Basis nonzero_Basis) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1729 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1730 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1731 | unfolding polyhedron_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1732 |     apply (rule_tac x="{{x. (SOME i. i \<in> Basis) \<bullet> x \<le> -1},
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1733 |                         {x. -(SOME i. i \<in> Basis) \<bullet> x \<le> -1}}" in exI)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1734 | apply force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1735 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1736 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1737 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1738 | lemma polyhedron_halfspace_le: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1739 | fixes a :: "'a :: euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1740 |   shows "polyhedron {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1741 | proof (cases "a = 0") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1742 | case True then show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1743 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1744 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1745 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1746 | unfolding polyhedron_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1747 |     by (rule_tac x="{{x. a \<bullet> x \<le> b}}" in exI) auto
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1748 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1749 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1750 | lemma polyhedron_halfspace_ge: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1751 | fixes a :: "'a :: euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1752 |   shows "polyhedron {x. a \<bullet> x \<ge> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1753 | using polyhedron_halfspace_le [of "-a" "-b"] by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1754 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1755 | lemma polyhedron_hyperplane: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1756 | fixes a :: "'a :: euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1757 |   shows "polyhedron {x. a \<bullet> x = b}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1758 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1759 |   have "{x. a \<bullet> x = b} = {x. a \<bullet> x \<le> b} \<inter> {x. a \<bullet> x \<ge> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1760 | by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1761 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1762 | by (simp add: polyhedron_halfspace_ge polyhedron_halfspace_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1763 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1764 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1765 | lemma affine_imp_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1766 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1767 | shows "affine S \<Longrightarrow> polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1768 | by (metis affine_hull_eq polyhedron_Inter polyhedron_hyperplane affine_hull_finite_intersection_hyperplanes [of S]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1769 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1770 | lemma polyhedron_imp_closed: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1771 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1772 | shows "polyhedron S \<Longrightarrow> closed S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1773 | apply (simp add: polyhedron_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1774 | using closed_halfspace_le by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1775 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1776 | lemma polyhedron_imp_convex: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1777 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1778 | shows "polyhedron S \<Longrightarrow> convex S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1779 | apply (simp add: polyhedron_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1780 | using convex_Inter convex_halfspace_le by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1781 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1782 | lemma polyhedron_affine_hull: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1783 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1784 | shows "polyhedron(affine hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1785 | by (simp add: affine_imp_polyhedron) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1786 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1787 | |
| 69683 | 1788 | subsection\<open>Canonical polyhedron representation making facial structure explicit\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 1789 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1790 | proposition polyhedron_Int_affine: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1791 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1792 | shows "polyhedron S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1793 | (\<exists>F. finite F \<and> S = (affine hull S) \<inter> \<Inter>F \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1794 |                 (\<forall>h \<in> F. \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1795 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1796 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1797 | assume ?lhs then show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1798 | apply (simp add: polyhedron_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1799 | apply (erule ex_forward) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1800 | using hull_subset apply force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1801 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1802 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1803 | assume ?rhs then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1804 | apply clarify | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1805 | apply (erule ssubst) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1806 | apply (force intro: polyhedron_affine_hull polyhedron_halfspace_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1807 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1808 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1809 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1810 | proposition rel_interior_polyhedron_explicit: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1811 | assumes "finite F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1812 | and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1813 |       and faceq: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1814 | and psub: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> affine hull S \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1815 |     shows "rel_interior S = {x \<in> S. \<forall>h \<in> F. a h \<bullet> x < b h}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1816 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1817 | have rels: "\<And>x. x \<in> rel_interior S \<Longrightarrow> x \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1818 | by (meson IntE mem_rel_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1819 | moreover have "a i \<bullet> x < b i" if x: "x \<in> rel_interior S" and "i \<in> F" for x i | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1820 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1821 |     have fif: "F - {i} \<subset> F"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1822 | using \<open>i \<in> F\<close> Diff_insert_absorb Diff_subset set_insert psubsetI by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1823 |     then have "S \<subset> affine hull S \<inter> \<Inter>(F - {i})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1824 | by (rule psub) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1825 |     then obtain z where ssub: "S \<subseteq> \<Inter>(F - {i})" and zint: "z \<in> \<Inter>(F - {i})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1826 | and "z \<notin> S" and zaff: "z \<in> affine hull S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1827 | by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1828 | have "z \<noteq> x" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1829 | using \<open>z \<notin> S\<close> rels x by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1830 | have "z \<notin> affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1831 | using \<open>z \<notin> S\<close> seq by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1832 | then have aiz: "a i \<bullet> z > b i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1833 | using faceq zint zaff by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1834 | obtain e where "e > 0" "x \<in> S" and e: "ball x e \<inter> affine hull S \<subseteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1835 | using x by (auto simp: mem_rel_interior_ball) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1836 | then have ins: "\<And>y. \<lbrakk>norm (x - y) < e; y \<in> affine hull S\<rbrakk> \<Longrightarrow> y \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1837 | by (metis IntI subsetD dist_norm mem_ball) | 
| 63148 | 1838 | define \<xi> where "\<xi> = min (1/2) (e / 2 / norm(z - x))" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1839 | have "norm (\<xi> *\<^sub>R x - \<xi> *\<^sub>R z) = norm (\<xi> *\<^sub>R (x - z))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1840 | by (simp add: \<xi>_def algebra_simps norm_mult) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1841 | also have "... = \<xi> * norm (x - z)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1842 | using \<open>e > 0\<close> by (simp add: \<xi>_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1843 | also have "... < e" | 
| 70817 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 haftmann parents: 
70641diff
changeset | 1844 | using \<open>z \<noteq> x\<close> \<open>e > 0\<close> by (simp add: \<xi>_def min_def field_split_simps norm_minus_commute) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1845 | finally have lte: "norm (\<xi> *\<^sub>R x - \<xi> *\<^sub>R z) < e" . | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1846 | have \<xi>_aff: "\<xi> *\<^sub>R z + (1 - \<xi>) *\<^sub>R x \<in> affine hull S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1847 | by (metis \<open>x \<in> S\<close> add.commute affine_affine_hull diff_add_cancel hull_inc mem_affine zaff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1848 | have "\<xi> *\<^sub>R z + (1 - \<xi>) *\<^sub>R x \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1849 | apply (rule ins [OF _ \<xi>_aff]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1850 | apply (simp add: algebra_simps lte) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1851 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1852 | then obtain l where l: "0 < l" "l < 1" and ls: "(l *\<^sub>R z + (1 - l) *\<^sub>R x) \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1853 | apply (rule_tac l = \<xi> in that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1854 | using \<open>e > 0\<close> \<open>z \<noteq> x\<close> apply (auto simp: \<xi>_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1855 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1856 | then have i: "l *\<^sub>R z + (1 - l) *\<^sub>R x \<in> i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1857 | using seq \<open>i \<in> F\<close> by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1858 | have "b i * l + (a i \<bullet> x) * (1 - l) < a i \<bullet> (l *\<^sub>R z + (1 - l) *\<^sub>R x)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1859 | using l by (simp add: algebra_simps aiz) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1860 | also have "\<dots> \<le> b i" using i l | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1861 | using faceq mem_Collect_eq \<open>i \<in> F\<close> by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1862 | finally have "(a i \<bullet> x) * (1 - l) < b i * (1 - l)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1863 | by (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1864 | with l show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1865 | by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1866 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1867 | moreover have "x \<in> rel_interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1868 | if "x \<in> S" and less: "\<And>h. h \<in> F \<Longrightarrow> a h \<bullet> x < b h" for x | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1869 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1870 | have 1: "\<And>h. h \<in> F \<Longrightarrow> x \<in> interior h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1871 | by (metis interior_halfspace_le mem_Collect_eq less faceq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1872 | have 2: "\<And>y. \<lbrakk>\<forall>h\<in>F. y \<in> interior h; y \<in> affine hull S\<rbrakk> \<Longrightarrow> y \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1873 | by (metis IntI Inter_iff contra_subsetD interior_subset seq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1874 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1875 | apply (simp add: rel_interior \<open>x \<in> S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1876 | apply (rule_tac x="\<Inter>h\<in>F. interior h" in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1877 | apply (auto simp: \<open>finite F\<close> open_INT 1 2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1878 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1879 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1880 | ultimately show ?thesis by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1881 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1882 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1883 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1884 | lemma polyhedron_Int_affine_parallel: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1885 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1886 | shows "polyhedron S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1887 | (\<exists>F. finite F \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1888 | S = (affine hull S) \<inter> (\<Inter>F) \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1889 |               (\<forall>h \<in> F. \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b} \<and>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1890 | (\<forall>x \<in> affine hull S. (x + a) \<in> affine hull S)))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1891 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1892 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1893 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1894 | then obtain F where "finite F" and seq: "S = (affine hull S) \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1895 |                   and faces: "\<And>h. h \<in> F \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1896 | by (fastforce simp add: polyhedron_Int_affine) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1897 |   then obtain a b where ab: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1898 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1899 | show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1900 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1901 | have "\<exists>a' b'. a' \<noteq> 0 \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1902 |                   affine hull S \<inter> {x. a' \<bullet> x \<le> b'} = affine hull S \<inter> h \<and>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1903 | (\<forall>w \<in> affine hull S. (w + a') \<in> affine hull S)" | 
| 69508 | 1904 | if "h \<in> F" "\<not>(affine hull S \<subseteq> h)" for h | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1905 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1906 |       have "a h \<noteq> 0" and "h = {x. a h \<bullet> x \<le> b h}" "h \<inter> \<Inter>F = \<Inter>F"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1907 | using \<open>h \<in> F\<close> ab by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1908 |       then have "(affine hull S) \<inter> {x. a h \<bullet> x \<le> b h} \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1909 | by (metis (no_types) affine_hull_eq_empty inf.absorb_iff2 inf_assoc inf_bot_right inf_commute seq that(2)) | 
| 69508 | 1910 |       moreover have "\<not> (affine hull S \<subseteq> {x. a h \<bullet> x \<le> b h})"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1911 |         using \<open>h = {x. a h \<bullet> x \<le> b h}\<close> that(2) by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1912 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1913 | using affine_parallel_slice [of "affine hull S"] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1914 |         by (metis \<open>h = {x. a h \<bullet> x \<le> b h}\<close> affine_affine_hull)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1915 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1916 | then obtain a b | 
| 69508 | 1917 | where ab: "\<And>h. \<lbrakk>h \<in> F; \<not> (affine hull S \<subseteq> h)\<rbrakk> | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1918 | \<Longrightarrow> a h \<noteq> 0 \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1919 |                   affine hull S \<inter> {x. a h \<bullet> x \<le> b h} = affine hull S \<inter> h \<and>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1920 | (\<forall>w \<in> affine hull S. (w + a h) \<in> affine hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1921 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1922 |     have seq2: "S = affine hull S \<inter> (\<Inter>h\<in>{h \<in> F. \<not> affine hull S \<subseteq> h}. {x. a h \<bullet> x \<le> b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1923 | by (subst seq) (auto simp: ab INT_extend_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1924 | show ?thesis | 
| 69508 | 1925 |       apply (rule_tac x="(\<lambda>h. {x. a h \<bullet> x \<le> b h}) ` {h. h \<in> F \<and> \<not>(affine hull S \<subseteq> h)}" in exI)
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1926 | apply (intro conjI seq2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1927 | using \<open>finite F\<close> apply force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1928 | using ab apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1929 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1930 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1931 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1932 | assume ?rhs then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1933 | apply (simp add: polyhedron_Int_affine) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1934 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1935 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1936 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1937 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1938 | proposition polyhedron_Int_affine_parallel_minimal: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1939 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1940 | shows "polyhedron S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1941 | (\<exists>F. finite F \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1942 | S = (affine hull S) \<inter> (\<Inter>F) \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1943 |               (\<forall>h \<in> F. \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b} \<and>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1944 | (\<forall>x \<in> affine hull S. (x + a) \<in> affine hull S)) \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1945 | (\<forall>F'. F' \<subset> F \<longrightarrow> S \<subset> (affine hull S) \<inter> (\<Inter>F')))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1946 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1947 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1948 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1949 | then obtain f0 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1950 | where f0: "finite f0" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1951 | "S = (affine hull S) \<inter> (\<Inter>f0)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1952 | (is "?P f0") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1953 |                  "\<forall>h \<in> f0. \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b} \<and>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1954 | (\<forall>x \<in> affine hull S. (x + a) \<in> affine hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1955 | (is "?Q f0") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1956 | by (force simp: polyhedron_Int_affine_parallel) | 
| 63148 | 1957 | define n where "n = (LEAST n. \<exists>F. card F = n \<and> finite F \<and> ?P F \<and> ?Q F)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1958 | have nf: "\<exists>F. card F = n \<and> finite F \<and> ?P F \<and> ?Q F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1959 | apply (simp add: n_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1960 | apply (rule LeastI [where k = "card f0"]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1961 | using f0 apply auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1962 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1963 | then obtain F where F: "card F = n" "finite F" and seq: "?P F" and aff: "?Q F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1964 | by blast | 
| 69508 | 1965 | then have "\<not> (finite g \<and> ?P g \<and> ?Q g)" if "card g < n" for g | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1966 | using that by (auto simp: n_def dest!: not_less_Least) | 
| 69508 | 1967 | then have *: "\<not> (?P g \<and> ?Q g)" if "g \<subset> F" for g | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1968 | using that \<open>finite F\<close> psubset_card_mono \<open>card F = n\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1969 | by (metis finite_Int inf.strict_order_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1970 | have 1: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subseteq> affine hull S \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1971 | by (subst seq) blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1972 | have 2: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<noteq> affine hull S \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1973 | apply (frule *) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1974 | by (metis aff subsetCE subset_iff_psubset_eq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1975 | show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1976 | by (metis \<open>finite F\<close> seq aff psubsetI 1 2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1977 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1978 | assume ?rhs then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1979 | by (auto simp: polyhedron_Int_affine_parallel) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1980 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1981 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1982 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1983 | lemma polyhedron_Int_affine_minimal: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1984 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1985 | shows "polyhedron S \<longleftrightarrow> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1986 | (\<exists>F. finite F \<and> S = (affine hull S) \<inter> \<Inter>F \<and> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1987 |               (\<forall>h \<in> F. \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}) \<and>
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1988 | (\<forall>F'. F' \<subset> F \<longrightarrow> S \<subset> (affine hull S) \<inter> \<Inter>F'))" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1989 | apply (rule iffI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1990 | apply (force simp: polyhedron_Int_affine_parallel_minimal elim!: ex_forward) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1991 | apply (auto simp: polyhedron_Int_affine elim!: ex_forward) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1992 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1993 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 1994 | proposition facet_of_polyhedron_explicit: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1995 | assumes "finite F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1996 | and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1997 |       and faceq: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1998 | and psub: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> affine hull S \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1999 |     shows "c facet_of S \<longleftrightarrow> (\<exists>h. h \<in> F \<and> c = S \<inter> {x. a h \<bullet> x = b h})"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2000 | proof (cases "S = {}")
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2001 | case True with psub show ?thesis by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2002 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2003 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2004 | have "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2005 | apply (simp add: polyhedron_Int_affine) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2006 | apply (rule_tac x=F in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2007 | using assms apply force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2008 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2009 | then have "convex S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2010 | by (rule polyhedron_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2011 |   with False rel_interior_eq_empty have "rel_interior S \<noteq> {}" by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2012 | then obtain x where "x \<in> rel_interior S" by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2013 | then obtain T where "open T" "x \<in> T" "x \<in> S" "T \<inter> affine hull S \<subseteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2014 | by (force simp: mem_rel_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2015 | then have xaff: "x \<in> affine hull S" and xint: "x \<in> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2016 | using seq hull_inc by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2017 |   have "rel_interior S = {x \<in> S. \<forall>h\<in>F. a h \<bullet> x < b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2018 | by (rule rel_interior_polyhedron_explicit [OF \<open>finite F\<close> seq faceq psub]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2019 | with \<open>x \<in> rel_interior S\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2020 | have [simp]: "\<And>h. h\<in>F \<Longrightarrow> a h \<bullet> x < b h" by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2021 |   have *: "(S \<inter> {x. a h \<bullet> x = b h}) facet_of S" if "h \<in> F" for h
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2022 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2023 |     have "S \<subset> affine hull S \<inter> \<Inter>(F - {h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2024 | using psub that by (metis Diff_disjoint Diff_subset insert_disjoint(2) psubsetI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2025 |     then obtain z where zaff: "z \<in> affine hull S" and zint: "z \<in> \<Inter>(F - {h})" and "z \<notin> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2026 | by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2027 | then have "z \<noteq> x" "z \<notin> h" using seq \<open>x \<in> S\<close> by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2028 | have "x \<in> h" using that xint by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2029 | then have able: "a h \<bullet> x \<le> b h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2030 | using faceq that by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2031 | also have "... < a h \<bullet> z" using \<open>z \<notin> h\<close> faceq [OF that] xint by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2032 | finally have xltz: "a h \<bullet> x < a h \<bullet> z" . | 
| 63148 | 2033 | define l where "l = (b h - a h \<bullet> x) / (a h \<bullet> z - a h \<bullet> x)" | 
| 2034 | define w where "w = (1 - l) *\<^sub>R x + l *\<^sub>R z" | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2035 | have "0 < l" "l < 1" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2036 | using able xltz \<open>b h < a h \<bullet> z\<close> \<open>h \<in> F\<close> | 
| 70817 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 haftmann parents: 
70641diff
changeset | 2037 | by (auto simp: l_def field_split_simps) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2038 | have awlt: "a i \<bullet> w < b i" if "i \<in> F" "i \<noteq> h" for i | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2039 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2040 | have "(1 - l) * (a i \<bullet> x) < (1 - l) * b i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2041 | by (simp add: \<open>l < 1\<close> \<open>i \<in> F\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2042 | moreover have "l * (a i \<bullet> z) \<le> l * b i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2043 | apply (rule mult_left_mono) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2044 | apply (metis Diff_insert_absorb Inter_iff Set.set_insert \<open>h \<in> F\<close> faceq insertE mem_Collect_eq that zint) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2045 | using \<open>0 < l\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2046 | apply simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2047 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2048 | ultimately show ?thesis by (simp add: w_def algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2049 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2050 | have weq: "a h \<bullet> w = b h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2051 | using xltz unfolding w_def l_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2052 | by (simp add: algebra_simps) (simp add: field_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2053 | have "w \<in> affine hull S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2054 | by (simp add: w_def mem_affine xaff zaff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2055 | moreover have "w \<in> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2056 | using \<open>a h \<bullet> w = b h\<close> awlt faceq less_eq_real_def by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2057 | ultimately have "w \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2058 | using seq by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2059 |     with weq have "S \<inter> {x. a h \<bullet> x = b h} \<noteq> {}" by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2060 |     moreover have "S \<inter> {x. a h \<bullet> x = b h} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2061 | apply (rule face_of_Int_supporting_hyperplane_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2062 | apply (rule \<open>convex S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2063 | apply (subst (asm) seq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2064 | using faceq that apply fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2065 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2066 |     moreover have "affine hull (S \<inter> {x. a h \<bullet> x = b h}) =
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2067 |                    (affine hull S) \<inter> {x. a h \<bullet> x = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2068 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2069 |       show "affine hull (S \<inter> {x. a h \<bullet> x = b h}) \<subseteq> affine hull S \<inter> {x. a h \<bullet> x = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2070 | apply (intro Int_greatest hull_mono Int_lower1) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2071 | apply (metis affine_hull_eq affine_hyperplane hull_mono inf_le2) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2072 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2073 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2074 |       show "affine hull S \<inter> {x. a h \<bullet> x = b h} \<subseteq> affine hull (S \<inter> {x. a h \<bullet> x = b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2075 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2076 | fix y | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2077 |         assume yaff: "y \<in> affine hull S \<inter> {y. a h \<bullet> y = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2078 | obtain T where "0 < T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2079 | and T: "\<And>j. \<lbrakk>j \<in> F; j \<noteq> h\<rbrakk> \<Longrightarrow> T * (a j \<bullet> y - a j \<bullet> w) \<le> b j - a j \<bullet> w" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2080 |         proof (cases "F - {h} = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2081 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2082 | by (rule_tac T=1 in that) auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2083 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2084 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2085 |           then obtain h' where h': "h' \<in> F - {h}" by auto
 | 
| 69661 | 2086 | let ?body = "(\<lambda>j. if 0 < a j \<bullet> y - a j \<bullet> w | 
| 63148 | 2087 | then (b j - a j \<bullet> w) / (a j \<bullet> y - a j \<bullet> w) | 
| 69661 | 2088 |               else 1) ` (F - {h})"
 | 
| 2089 | define inff where "inff = Inf ?body" | |
| 2090 | from \<open>finite F\<close> have "finite ?body" | |
| 2091 | by blast | |
| 2092 |           moreover from h' have "?body \<noteq> {}"
 | |
| 2093 | by blast | |
| 2094 | moreover have "j > 0" if "j \<in> ?body" for j | |
| 2095 | proof - | |
| 2096 | from that obtain x where "x \<in> F" and "x \<noteq> h" and *: "j = | |
| 2097 | (if 0 < a x \<bullet> y - a x \<bullet> w | |
| 2098 | then (b x - a x \<bullet> w) / (a x \<bullet> y - a x \<bullet> w) else 1)" | |
| 2099 | by blast | |
| 2100 | with awlt [of x] have "a x \<bullet> w < b x" | |
| 2101 | by simp | |
| 2102 | with * show ?thesis | |
| 2103 | by simp | |
| 2104 | qed | |
| 2105 | ultimately have "0 < inff" | |
| 2106 | by (simp_all add: finite_less_Inf_iff inff_def) | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2107 | moreover have "inff * (a j \<bullet> y - a j \<bullet> w) \<le> b j - a j \<bullet> w" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2108 | if "j \<in> F" "j \<noteq> h" for j | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2109 | proof (cases "a j \<bullet> w < a j \<bullet> y") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2110 | case True | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2111 | then have "inff \<le> (b j - a j \<bullet> w) / (a j \<bullet> y - a j \<bullet> w)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2112 | apply (simp add: inff_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2113 | apply (rule cInf_le_finite) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2114 | using \<open>finite F\<close> apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2115 | apply (simp add: that split: if_split_asm) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2116 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2117 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2118 | using \<open>0 < inff\<close> awlt [OF that] mult_strict_left_mono | 
| 71633 | 2119 | by (fastforce simp add: field_split_simps split: if_split_asm) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2120 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2121 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2122 | with \<open>0 < inff\<close> have "inff * (a j \<bullet> y - a j \<bullet> w) \<le> 0" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2123 | by (simp add: mult_le_0_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2124 | also have "... < b j - a j \<bullet> w" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2125 | by (simp add: awlt that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2126 | finally show ?thesis by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2127 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2128 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2129 | by (blast intro: that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2130 | qed | 
| 63148 | 2131 | define c where "c = (1 - T) *\<^sub>R w + T *\<^sub>R y" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2132 | have "(1 - T) *\<^sub>R w + T *\<^sub>R y \<in> j" if "j \<in> F" for j | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2133 | proof (cases "j = h") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2134 | case True | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2135 |           have "(1 - T) *\<^sub>R w + T *\<^sub>R y \<in> {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2136 | using weq yaff by (auto simp: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2137 | with True faceq [OF that] show ?thesis by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2138 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2139 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2140 |           with T that have "(1 - T) *\<^sub>R w + T *\<^sub>R y \<in> {x. a j \<bullet> x \<le> b j}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2141 | by (simp add: algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2142 | with faceq [OF that] show ?thesis by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2143 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2144 | moreover have "(1 - T) *\<^sub>R w + T *\<^sub>R y \<in> affine hull S" | 
| 63170 | 2145 | apply (rule affine_affine_hull [simplified affine_alt, rule_format]) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2146 | apply (simp add: \<open>w \<in> affine hull S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2147 | using yaff apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2148 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2149 | ultimately have "c \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2150 | using seq by (force simp: c_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2151 | moreover have "a h \<bullet> c = b h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2152 | using yaff by (force simp: c_def algebra_simps weq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2153 |         ultimately have caff: "c \<in> affine hull (S \<inter> {y. a h \<bullet> y = b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2154 | by (simp add: hull_inc) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2155 |         have waff: "w \<in> affine hull (S \<inter> {y. a h \<bullet> y = b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2156 | using \<open>w \<in> S\<close> weq by (blast intro: hull_inc) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2157 | have yeq: "y = (1 - inverse T) *\<^sub>R w + c /\<^sub>R T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2158 | using \<open>0 < T\<close> by (simp add: c_def algebra_simps) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2159 |         show "y \<in> affine hull (S \<inter> {y. a h \<bullet> y = b h})"
 | 
| 63170 | 2160 | by (metis yeq affine_affine_hull [simplified affine_alt, rule_format, OF waff caff]) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2161 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2162 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2163 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2164 | apply (simp add: facet_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2165 | apply (subst aff_dim_affine_hull [symmetric]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2166 | using \<open>b h < a h \<bullet> z\<close> zaff | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2167 | apply (force simp: aff_dim_affine_Int_hyperplane) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2168 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2169 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2170 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2171 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2172 |     show "\<exists>h. h \<in> F \<and> c = S \<inter> {x. a h \<bullet> x = b h} \<Longrightarrow> c facet_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2173 | using * by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2174 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2175 | assume "c facet_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2176 |     then have "c face_of S" "convex c" "c \<noteq> {}" and affc: "aff_dim c = aff_dim S - 1"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2177 | by (auto simp: facet_of_def face_of_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2178 | then obtain x where x: "x \<in> rel_interior c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2179 | by (force simp: rel_interior_eq_empty) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2180 | then have "x \<in> c" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2181 | by (meson subsetD rel_interior_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2182 | then have "x \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2183 | using \<open>c facet_of S\<close> facet_of_imp_subset by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2184 |     have rels: "rel_interior S = {x \<in> S. \<forall>h\<in>F. a h \<bullet> x < b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2185 | by (rule rel_interior_polyhedron_explicit [OF assms]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2186 | have "c \<noteq> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2187 | using \<open>c facet_of S\<close> facet_of_irrefl by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2188 | then have "x \<notin> rel_interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2189 | by (metis IntI empty_iff \<open>x \<in> c\<close> \<open>c \<noteq> S\<close> \<open>c face_of S\<close> face_of_disjoint_rel_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2190 | with rels \<open>x \<in> S\<close> obtain i where "i \<in> F" and i: "a i \<bullet> x \<ge> b i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2191 | by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2192 |     have "x \<in> {u. a i \<bullet> u \<le> b i}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2193 | by (metis IntD2 InterE \<open>i \<in> F\<close> \<open>x \<in> S\<close> faceq seq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2194 | then have "a i \<bullet> x \<le> b i" by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2195 | then have "a i \<bullet> x = b i" using i by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2196 |     have "c \<subseteq> S \<inter> {x. a i \<bullet> x = b i}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2197 | apply (rule subset_of_face_of [of _ S]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2198 | apply (simp add: "*" \<open>i \<in> F\<close> facet_of_imp_face_of) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2199 | apply (simp add: \<open>c face_of S\<close> face_of_imp_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2200 | using \<open>a i \<bullet> x = b i\<close> \<open>x \<in> S\<close> x by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2201 |     then have cface: "c face_of (S \<inter> {x. a i \<bullet> x = b i})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2202 | by (meson \<open>c face_of S\<close> face_of_subset inf_le1) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2203 |     have con: "convex (S \<inter> {x. a i \<bullet> x = b i})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2204 | by (simp add: \<open>convex S\<close> convex_Int convex_hyperplane) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2205 |     show "\<exists>h. h \<in> F \<and> c = S \<inter> {x. a h \<bullet> x = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2206 | apply (rule_tac x=i in exI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2207 | apply (simp add: \<open>i \<in> F\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2208 | by (metis (no_types) * \<open>i \<in> F\<close> affc facet_of_def less_irrefl face_of_aff_dim_lt [OF con cface]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2209 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2210 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2211 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2212 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2213 | lemma face_of_polyhedron_subset_explicit: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2214 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2215 | assumes "finite F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2216 | and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2217 |       and faceq: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2218 | and psub: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> affine hull S \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2219 |       and c: "c face_of S" and "c \<noteq> {}" "c \<noteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2220 |    obtains h where "h \<in> F" "c \<subseteq> S \<inter> {x. a h \<bullet> x = b h}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2221 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2222 | have "c \<subseteq> S" using \<open>c face_of S\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2223 | by (simp add: face_of_imp_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2224 | have "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2225 | apply (simp add: polyhedron_Int_affine) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2226 | by (metis \<open>finite F\<close> faceq seq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2227 | then have "convex S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2228 | by (simp add: polyhedron_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2229 |   then have *: "(S \<inter> {x. a h \<bullet> x = b h}) face_of S" if "h \<in> F" for h
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2230 | apply (rule face_of_Int_supporting_hyperplane_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2231 | using faceq seq that by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2232 |   have "rel_interior c \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2233 |     using c \<open>c \<noteq> {}\<close> face_of_imp_convex rel_interior_eq_empty by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2234 | then obtain x where "x \<in> rel_interior c" by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2235 |   have rels: "rel_interior S = {x \<in> S. \<forall>h\<in>F. a h \<bullet> x < b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2236 | by (rule rel_interior_polyhedron_explicit [OF \<open>finite F\<close> seq faceq psub]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2237 | then have xnot: "x \<notin> rel_interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2238 | by (metis IntI \<open>x \<in> rel_interior c\<close> c \<open>c \<noteq> S\<close> contra_subsetD empty_iff face_of_disjoint_rel_interior rel_interior_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2239 | then have "x \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2240 | using \<open>c \<subseteq> S\<close> \<open>x \<in> rel_interior c\<close> rel_interior_subset by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2241 | then have xint: "x \<in> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2242 | using seq by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2243 |   have "F \<noteq> {}" using assms
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2244 | by (metis affine_Int affine_Inter affine_affine_hull ex_in_conv face_of_affine_trivial) | 
| 69508 | 2245 | then obtain i where "i \<in> F" "\<not> (a i \<bullet> x < b i)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2246 | using \<open>x \<in> S\<close> rels xnot by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2247 | with xint have "a i \<bullet> x = b i" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2248 | by (metis eq_iff mem_Collect_eq not_le Inter_iff faceq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2249 |   have face: "S \<inter> {x. a i \<bullet> x = b i} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2250 | by (simp add: "*" \<open>i \<in> F\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2251 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2252 | apply (rule_tac h = i in that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2253 | apply (rule \<open>i \<in> F\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2254 | apply (rule subset_of_face_of [OF face \<open>c \<subseteq> S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2255 | using \<open>a i \<bullet> x = b i\<close> \<open>x \<in> rel_interior c\<close> \<open>x \<in> S\<close> apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2256 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2257 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2258 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2259 | text\<open>Initial part of proof duplicates that above\<close> | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2260 | proposition face_of_polyhedron_explicit: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2261 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2262 | assumes "finite F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2263 | and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2264 |       and faceq: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2265 | and psub: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> affine hull S \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2266 |       and c: "c face_of S" and "c \<noteq> {}" "c \<noteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2267 |     shows "c = \<Inter>{S \<inter> {x. a h \<bullet> x = b h} | h. h \<in> F \<and> c \<subseteq> S \<inter> {x. a h \<bullet> x = b h}}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2268 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2269 |   let ?ab = "\<lambda>h. {x. a h \<bullet> x = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2270 | have "c \<subseteq> S" using \<open>c face_of S\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2271 | by (simp add: face_of_imp_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2272 | have "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2273 | apply (simp add: polyhedron_Int_affine) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2274 | by (metis \<open>finite F\<close> faceq seq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2275 | then have "convex S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2276 | by (simp add: polyhedron_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2277 | then have *: "(S \<inter> ?ab h) face_of S" if "h \<in> F" for h | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2278 | apply (rule face_of_Int_supporting_hyperplane_le) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2279 | using faceq seq that by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2280 |   have "rel_interior c \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2281 |     using c \<open>c \<noteq> {}\<close> face_of_imp_convex rel_interior_eq_empty by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2282 | then obtain z where z: "z \<in> rel_interior c" by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2283 |   have rels: "rel_interior S = {z \<in> S. \<forall>h\<in>F. a h \<bullet> z < b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2284 | by (rule rel_interior_polyhedron_explicit [OF \<open>finite F\<close> seq faceq psub]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2285 | then have xnot: "z \<notin> rel_interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2286 | by (metis IntI \<open>z \<in> rel_interior c\<close> c \<open>c \<noteq> S\<close> contra_subsetD empty_iff face_of_disjoint_rel_interior rel_interior_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2287 | then have "z \<in> S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2288 | using \<open>c \<subseteq> S\<close> \<open>z \<in> rel_interior c\<close> rel_interior_subset by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2289 | with seq have xint: "z \<in> \<Inter>F" by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2290 |   have "open (\<Inter>h\<in>{h \<in> F. a h \<bullet> z < b h}. {w. a h \<bullet> w < b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2291 | by (auto simp: \<open>finite F\<close> open_halfspace_lt open_INT) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2292 | then obtain e where "0 < e" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2293 |                  "ball z e \<subseteq> (\<Inter>h\<in>{h \<in> F. a h \<bullet> z < b h}. {w. a h \<bullet> w < b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2294 | by (auto intro: openE [of _ z]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2295 |   then have e: "\<And>h. \<lbrakk>h \<in> F; a h \<bullet> z < b h\<rbrakk> \<Longrightarrow> ball z e \<subseteq> {w. a h \<bullet> w < b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2296 | by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2297 | have "c \<subseteq> (S \<inter> ?ab h) \<longleftrightarrow> z \<in> S \<inter> ?ab h" if "h \<in> F" for h | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2298 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2299 | show "z \<in> S \<inter> ?ab h \<Longrightarrow> c \<subseteq> S \<inter> ?ab h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2300 | apply (rule subset_of_face_of [of _ S]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2301 | using that \<open>c \<subseteq> S\<close> \<open>z \<in> rel_interior c\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2302 | using facet_of_polyhedron_explicit [OF \<open>finite F\<close> seq faceq psub] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2303 | unfolding facet_of_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2304 | apply auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2305 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2306 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2307 | show "c \<subseteq> S \<inter> ?ab h \<Longrightarrow> z \<in> S \<inter> ?ab h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2308 | using \<open>z \<in> rel_interior c\<close> rel_interior_subset by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2309 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2310 |   then have **: "{S \<inter> ?ab h | h. h \<in> F \<and> c \<subseteq> S \<and> c \<subseteq> ?ab h} =
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2311 |                  {S \<inter> ?ab h |h. h \<in> F \<and> z \<in> S \<inter> ?ab h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2312 | by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2313 |   have bsub: "ball z e \<inter> affine hull \<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> a h \<bullet> z = b h}
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2314 |              \<subseteq> affine hull S \<inter> \<Inter>F \<inter> \<Inter>{?ab h |h. h \<in> F \<and> a h \<bullet> z = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2315 | if "i \<in> F" and i: "a i \<bullet> z = b i" for i | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2316 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2317 |     have sub: "ball z e \<inter> \<Inter>{?ab h |h. h \<in> F \<and> a h \<bullet> z = b h} \<subseteq> j"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2318 | if "j \<in> F" for j | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2319 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2320 | have "a j \<bullet> z \<le> b j" using faceq that xint by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2321 | then consider "a j \<bullet> z < b j" | "a j \<bullet> z = b j" by linarith | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2322 |       then have "\<exists>G. G \<in> {?ab h |h. h \<in> F \<and> a h \<bullet> z = b h} \<and> ball z e \<inter> G \<subseteq> j"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2323 | proof cases | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2324 | assume "a j \<bullet> z < b j" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2325 |         then have "ball z e \<inter> {x. a i \<bullet> x = b i} \<subseteq> j"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2326 | using e [OF \<open>j \<in> F\<close>] faceq that | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2327 | by (fastforce simp: ball_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2328 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2329 |           by (rule_tac x="{x. a i \<bullet> x = b i}" in exI) (force simp: \<open>i \<in> F\<close> i)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2330 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2331 | assume eq: "a j \<bullet> z = b j" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2332 | with faceq that show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2333 |           by (rule_tac x="{x. a j \<bullet> x = b j}" in exI) (fastforce simp add: \<open>j \<in> F\<close>)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2334 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2335 | then show ?thesis by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2336 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2337 |     have 1: "affine hull \<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> a h \<bullet> z = b h} \<subseteq> affine hull S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2338 | apply (rule hull_mono) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2339 | using that \<open>z \<in> S\<close> by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2340 |     have 2: "affine hull \<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> a h \<bullet> z = b h}
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2341 |           \<subseteq> \<Inter>{?ab h |h. h \<in> F \<and> a h \<bullet> z = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2342 | by (rule hull_minimal) (auto intro: affine_hyperplane) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2343 |     have 3: "ball z e \<inter> \<Inter>{?ab h |h. h \<in> F \<and> a h \<bullet> z = b h} \<subseteq> \<Inter>F"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2344 | by (iprover intro: sub Inter_greatest) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2345 | have *: "\<lbrakk>A \<subseteq> (B :: 'a set); A \<subseteq> C; E \<inter> C \<subseteq> D\<rbrakk> \<Longrightarrow> E \<inter> A \<subseteq> (B \<inter> D) \<inter> C" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2346 | for A B C D E by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2347 | show ?thesis by (intro * 1 2 3) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2348 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2349 | have "\<exists>h. h \<in> F \<and> c \<subseteq> ?ab h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2350 | apply (rule face_of_polyhedron_subset_explicit [OF \<open>finite F\<close> seq faceq psub]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2351 | using assms by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2352 |   then have fac: "\<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> c \<subseteq> S \<inter> ?ab h} face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2353 | using * by (force simp: \<open>c \<subseteq> S\<close> intro: face_of_Inter) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2354 | have red: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2355 |      "(\<And>a. P a \<Longrightarrow> T \<subseteq> S \<inter> \<Inter>{F x |x. P x}) \<Longrightarrow> T \<subseteq> \<Inter>{S \<inter> F x |x. P x}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2356 | for P T F by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2357 |   have "ball z e \<inter> affine hull \<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> a h \<bullet> z = b h}
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2358 |         \<subseteq> \<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> a h \<bullet> z = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2359 | apply (rule red) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2360 | apply (metis seq bsub) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2361 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2362 | with \<open>0 < e\<close> have zinrel: "z \<in> rel_interior | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2363 |                     (\<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> z \<in> S \<and> a h \<bullet> z = b h})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2364 | by (auto simp: mem_rel_interior_ball \<open>z \<in> S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2365 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2366 | apply (rule face_of_eq [OF c fac]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2367 | using z zinrel apply (force simp: **) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2368 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2369 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2370 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2371 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2372 | subsection\<open>More general corollaries from the explicit representation\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2373 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2374 | corollary facet_of_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2375 | assumes "polyhedron S" and "c facet_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2376 |   obtains a b where "a \<noteq> 0" "S \<subseteq> {x. a \<bullet> x \<le> b}" "c = S \<inter> {x. a \<bullet> x = b}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2377 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2378 | obtain F where "finite F" and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2379 |              and faces: "\<And>h. h \<in> F \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2380 | and min: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> (affine hull S) \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2381 | using assms by (simp add: polyhedron_Int_affine_minimal) meson | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2382 |   then obtain a b where ab: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2383 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2384 |   obtain i where "i \<in> F" and c: "c = S \<inter> {x. a i \<bullet> x = b i}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2385 | using facet_of_polyhedron_explicit [OF \<open>finite F\<close> seq ab min] assms | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2386 | by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2387 |   moreover have ssub: "S \<subseteq> {x. a i \<bullet> x \<le> b i}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2388 | apply (subst seq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2389 | using \<open>i \<in> F\<close> ab by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2390 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2391 | by (rule_tac a = "a i" and b = "b i" in that) (simp_all add: ab) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2392 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2393 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2394 | corollary face_of_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2395 |   assumes "polyhedron S" and "c face_of S" and "c \<noteq> {}" and "c \<noteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2396 |     shows "c = \<Inter>{F. F facet_of S \<and> c \<subseteq> F}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2397 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2398 | obtain F where "finite F" and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2399 |              and faces: "\<And>h. h \<in> F \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2400 | and min: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> (affine hull S) \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2401 | using assms by (simp add: polyhedron_Int_affine_minimal) meson | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2402 |   then obtain a b where ab: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2403 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2404 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2405 | apply (subst face_of_polyhedron_explicit [OF \<open>finite F\<close> seq ab min]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2406 | apply (auto simp: assms facet_of_polyhedron_explicit [OF \<open>finite F\<close> seq ab min] cong: Collect_cong) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2407 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2408 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2409 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2410 | lemma face_of_polyhedron_subset_facet: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2411 |   assumes "polyhedron S" and "c face_of S" and "c \<noteq> {}" and "c \<noteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2412 | obtains F where "F facet_of S" "c \<subseteq> F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2413 | using face_of_polyhedron assms | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2414 | by (metis (no_types, lifting) Inf_greatest antisym_conv face_of_imp_subset mem_Collect_eq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2415 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2416 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2417 | lemma exposed_face_of_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2418 | assumes "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2419 | shows "F exposed_face_of S \<longleftrightarrow> F face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2420 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2421 | show "F exposed_face_of S \<Longrightarrow> F face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2422 | by (simp add: exposed_face_of_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2423 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2424 | assume "F face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2425 | show "F exposed_face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2426 |   proof (cases "F = {} \<or> F = S")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2427 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2428 | using \<open>F face_of S\<close> exposed_face_of by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2429 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2430 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2431 |     then have "{g. g facet_of S \<and> F \<subseteq> g} \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2432 | by (metis Collect_empty_eq_bot \<open>F face_of S\<close> assms empty_def face_of_polyhedron_subset_facet) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2433 | moreover have "\<And>T. \<lbrakk>T facet_of S; F \<subseteq> T\<rbrakk> \<Longrightarrow> T exposed_face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2434 | by (metis assms exposed_face_of facet_of_imp_face_of facet_of_polyhedron) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2435 |     ultimately have "\<Inter>{fa.
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2436 | fa facet_of S \<and> F \<subseteq> fa} exposed_face_of S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2437 | by (metis (no_types, lifting) mem_Collect_eq exposed_face_of_Inter) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2438 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2439 | using False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2440 | apply (subst face_of_polyhedron [OF assms \<open>F face_of S\<close>], auto) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2441 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2442 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2443 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2444 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2445 | lemma face_of_polyhedron_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2446 | fixes S :: "'a :: euclidean_space set" | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 2447 | assumes "polyhedron S" "c face_of S" shows "polyhedron c" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 2448 | by (metis assms face_of_imp_eq_affine_Int polyhedron_Int polyhedron_affine_hull polyhedron_imp_convex) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2449 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2450 | lemma finite_polyhedron_faces: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2451 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2452 | assumes "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2453 |     shows "finite {F. F face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2454 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2455 | obtain F where "finite F" and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2456 |              and faces: "\<And>h. h \<in> F \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2457 | and min: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> (affine hull S) \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2458 | using assms by (simp add: polyhedron_Int_affine_minimal) meson | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2459 |   then obtain a b where ab: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2460 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2461 |   have "finite {\<Inter>{S \<inter> {x. a h \<bullet> x = b h} |h. h \<in> F'}| F'. F' \<in> Pow F}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2462 | by (simp add: \<open>finite F\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2463 |   moreover have "{F. F face_of S} - {{}, S} \<subseteq> {\<Inter>{S \<inter> {x. a h \<bullet> x = b h} |h. h \<in> F'}| F'. F' \<in> Pow F}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2464 | apply clarify | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2465 | apply (rename_tac c) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2466 | apply (drule face_of_polyhedron_explicit [OF \<open>finite F\<close> seq ab min, simplified], simp_all) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2467 | apply (erule ssubst) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2468 |     apply (rule_tac x="{h \<in> F. c \<subseteq> S \<inter> {x. a h \<bullet> x = b h}}" in exI, auto)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2469 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2470 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2471 | by (meson finite.emptyI finite.insertI finite_Diff2 finite_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2472 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2473 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2474 | lemma finite_polyhedron_exposed_faces: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2475 |    "polyhedron S \<Longrightarrow> finite {F. F exposed_face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2476 | using exposed_face_of_polyhedron finite_polyhedron_faces by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2477 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2478 | lemma finite_polyhedron_extreme_points: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2479 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2480 |   shows "polyhedron S \<Longrightarrow> finite {v. v extreme_point_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2481 | apply (simp add: face_of_singleton [symmetric]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2482 | apply (rule finite_subset [OF _ finite_vimageI [OF finite_polyhedron_faces]], auto) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2483 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2484 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2485 | lemma finite_polyhedron_facets: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2486 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2487 |   shows "polyhedron S \<Longrightarrow> finite {F. F facet_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2488 | unfolding facet_of_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2489 | by (blast intro: finite_subset [OF _ finite_polyhedron_faces]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2490 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2491 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2492 | proposition rel_interior_of_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2493 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2494 | assumes "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2495 |     shows "rel_interior S = S - \<Union>{F. F facet_of S}"
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2496 | proof - | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2497 | obtain F where "finite F" and seq: "S = affine hull S \<inter> \<Inter>F" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2498 |              and faces: "\<And>h. h \<in> F \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x \<le> b}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2499 | and min: "\<And>F'. F' \<subset> F \<Longrightarrow> S \<subset> (affine hull S) \<inter> \<Inter>F'" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2500 | using assms by (simp add: polyhedron_Int_affine_minimal) meson | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2501 |   then obtain a b where ab: "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> h = {x. a h \<bullet> x \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2502 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2503 |   have facet: "(c facet_of S) \<longleftrightarrow> (\<exists>h. h \<in> F \<and> c = S \<inter> {x. a h \<bullet> x = b h})" for c
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2504 | by (rule facet_of_polyhedron_explicit [OF \<open>finite F\<close> seq ab min]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2505 |   have rel: "rel_interior S = {x \<in> S. \<forall>h\<in>F. a h \<bullet> x < b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2506 | by (rule rel_interior_polyhedron_explicit [OF \<open>finite F\<close> seq ab min]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2507 |   have "a h \<bullet> x < b h" if "x \<in> S" "h \<in> F" and xnot: "x \<notin> \<Union>{F. F facet_of S}" for x h
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2508 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2509 | have "x \<in> \<Inter>F" using seq that by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2510 | with \<open>h \<in> F\<close> ab have "a h \<bullet> x \<le> b h" by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2511 | then consider "a h \<bullet> x < b h" | "a h \<bullet> x = b h" by linarith | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2512 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2513 | proof cases | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2514 | case 1 then show ?thesis . | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2515 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2516 | case 2 | 
| 67399 | 2517 |       have "Collect ((\<in>) x) \<notin> Collect ((\<in>) (\<Union>{A. A facet_of S}))"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2518 | using xnot by fastforce | 
| 67399 | 2519 | then have "F \<notin> Collect ((\<in>) h)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2520 | using 2 \<open>x \<in> S\<close> facet by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2521 |       with \<open>h \<in> F\<close> have "\<Inter>F \<subseteq> S \<inter> {x. a h \<bullet> x = b h}" by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2522 | with 2 that \<open>x \<in> \<Inter>F\<close> show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2523 | apply simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2524 | apply (drule_tac x="\<Inter>F" in spec) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2525 | apply (simp add: facet) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2526 | apply (drule_tac x=h in spec) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2527 | using seq by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2528 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2529 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2530 |   moreover have "\<exists>h\<in>F. a h \<bullet> x \<ge> b h" if "x \<in> \<Union>{F. F facet_of S}" for x
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2531 | using that by (force simp: facet) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2532 | ultimately show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2533 | by (force simp: rel) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2534 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2535 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2536 | lemma rel_boundary_of_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2537 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2538 | assumes "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2539 |     shows "S - rel_interior S = \<Union> {F. F facet_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2540 | using facet_of_imp_subset by (fastforce simp add: rel_interior_of_polyhedron assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2541 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2542 | lemma rel_frontier_of_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2543 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2544 | assumes "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2545 |     shows "rel_frontier S = \<Union> {F. F facet_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2546 | by (simp add: assms rel_frontier_def polyhedron_imp_closed rel_boundary_of_polyhedron) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2547 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2548 | lemma rel_frontier_of_polyhedron_alt: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2549 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2550 | assumes "polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2551 |     shows "rel_frontier S = \<Union> {F. F face_of S \<and> (F \<noteq> S)}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2552 | apply (rule subset_antisym) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2553 | apply (force simp: rel_frontier_of_polyhedron facet_of_def assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2554 | using face_of_subset_rel_frontier by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2555 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2556 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2557 | text\<open>A characterization of polyhedra as having finitely many faces\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2558 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2559 | proposition polyhedron_eq_finite_exposed_faces: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2560 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2561 |   shows "polyhedron S \<longleftrightarrow> closed S \<and> convex S \<and> finite {F. F exposed_face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2562 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2563 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2564 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2565 | then show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2566 | by (auto simp: polyhedron_imp_closed polyhedron_imp_convex finite_polyhedron_exposed_faces) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2567 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2568 | assume ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2569 |   then have "closed S" "convex S" and fin: "finite {F. F exposed_face_of S}" by auto
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2570 | show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2571 |   proof (cases "S = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2572 | case True then show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2573 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2574 | case False | 
| 63148 | 2575 |     define F where "F = {h. h exposed_face_of S \<and> h \<noteq> {} \<and> h \<noteq> S}"
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2576 | have "finite F" by (simp add: fin F_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2577 | have hface: "h face_of S" | 
| 63148 | 2578 |       and "\<exists>a b. a \<noteq> 0 \<and> S \<subseteq> {x. a \<bullet> x \<le> b} \<and> h = S \<inter> {x. a \<bullet> x = b}"
 | 
| 2579 | if "h \<in> F" for h | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2580 | using exposed_face_of F_def that by simp_all auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2581 | then obtain a b where ab: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2582 |       "\<And>h. h \<in> F \<Longrightarrow> a h \<noteq> 0 \<and> S \<subseteq> {x. a h \<bullet> x \<le> b h} \<and> h = S \<inter> {x. a h \<bullet> x = b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2583 | by metis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2584 | have *: "False" | 
| 63148 | 2585 | if paff: "p \<in> affine hull S" and "p \<notin> S" | 
| 2586 |       and pint: "p \<in> \<Inter>{{x. a h \<bullet> x \<le> b h} |h. h \<in> F}" for p
 | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2587 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2588 |       have "rel_interior S \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2589 |         by (simp add: \<open>S \<noteq> {}\<close> \<open>convex S\<close> rel_interior_eq_empty)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2590 | then obtain c where c: "c \<in> rel_interior S" by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2591 | with rel_interior_subset have "c \<in> S" by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2592 | have ccp: "closed_segment c p \<subseteq> affine hull S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2593 | by (meson affine_affine_hull affine_imp_convex c closed_segment_subset hull_subset paff rel_interior_subset subsetCE) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2594 | obtain x where xcl: "x \<in> closed_segment c p" and "x \<in> S" and xnot: "x \<notin> rel_interior S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2595 | using connected_openin [of "closed_segment c p"] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2596 | apply simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2597 | apply (drule_tac x="closed_segment c p \<inter> rel_interior S" in spec) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2598 | apply (erule impE) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2599 | apply (force simp: openin_rel_interior openin_Int intro: openin_subtopology_Int_subset [OF _ ccp]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2600 | apply (drule_tac x="closed_segment c p \<inter> (- S)" in spec) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2601 | using rel_interior_subset \<open>closed S\<close> c \<open>p \<notin> S\<close> apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2602 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2603 | then obtain \<mu> where "0 \<le> \<mu>" "\<mu> \<le> 1" and xeq: "x = (1 - \<mu>) *\<^sub>R c + \<mu> *\<^sub>R p" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2604 | by (auto simp: in_segment) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2605 | show False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2606 | proof (cases "\<mu>=0 \<or> \<mu>=1") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2607 | case True with xeq c xnot \<open>x \<in> S\<close> \<open>p \<notin> S\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2608 | show False by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2609 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2610 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2611 | then have xos: "x \<in> open_segment c p" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2612 | using \<open>x \<in> S\<close> c open_segment_def that(2) xcl xnot by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2613 | have xclo: "x \<in> closure S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2614 | using \<open>x \<in> S\<close> closure_subset by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2615 | obtain d where "d \<noteq> 0" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2616 | and dle: "\<And>y. y \<in> closure S \<Longrightarrow> d \<bullet> x \<le> d \<bullet> y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2617 | and dless: "\<And>y. y \<in> rel_interior S \<Longrightarrow> d \<bullet> x < d \<bullet> y" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2618 | by (metis supporting_hyperplane_relative_frontier [OF \<open>convex S\<close> xclo xnot]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2619 |         have sex: "S \<inter> {y. d \<bullet> y = d \<bullet> x} exposed_face_of S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2620 | by (simp add: \<open>closed S\<close> dle exposed_face_of_Int_supporting_hyperplane_ge [OF \<open>convex S\<close>]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2621 |         have sne: "S \<inter> {y. d \<bullet> y = d \<bullet> x} \<noteq> {}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2622 | using \<open>x \<in> S\<close> by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2623 |         have sns: "S \<inter> {y. d \<bullet> y = d \<bullet> x} \<noteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2624 | by (metis (mono_tags) Int_Collect c subsetD dless not_le order_refl rel_interior_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2625 | obtain h where "h \<in> F" "x \<in> h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2626 |           apply (rule_tac h="S \<inter> {y. d \<bullet> y = d \<bullet> x}" in that)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2627 | apply (simp_all add: F_def sex sne sns \<open>x \<in> S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2628 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2629 |         have abface: "{y. a h \<bullet> y = b h} face_of {y. a h \<bullet> y \<le> b h}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2630 | using hyperplane_face_of_halfspace_le by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2631 | then have "c \<in> h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2632 | using face_ofD [OF abface xos] \<open>c \<in> S\<close> \<open>h \<in> F\<close> ab pint \<open>x \<in> h\<close> by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2633 |         with c have "h \<inter> rel_interior S \<noteq> {}" by blast
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2634 | then show False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2635 | using \<open>h \<in> F\<close> F_def face_of_disjoint_rel_interior hface by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2636 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2637 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2638 |     have "S \<subseteq> affine hull S \<inter> \<Inter>{{x. a h \<bullet> x \<le> b h} |h. h \<in> F}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2639 | using ab by (auto simp: hull_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2640 |     moreover have "affine hull S \<inter> \<Inter>{{x. a h \<bullet> x \<le> b h} |h. h \<in> F} \<subseteq> S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2641 | using * by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2642 |     ultimately have "S = affine hull S \<inter> \<Inter> {{x. a h \<bullet> x \<le> b h} |h. h \<in> F}" ..
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2643 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2644 | apply (rule ssubst) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2645 | apply (force intro: polyhedron_affine_hull polyhedron_halfspace_le simp: \<open>finite F\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2646 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2647 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2648 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2649 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2650 | corollary polyhedron_eq_finite_faces: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2651 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2652 |   shows "polyhedron S \<longleftrightarrow> closed S \<and> convex S \<and> finite {F. F face_of S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2653 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2654 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2655 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2656 | then show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2657 | by (simp add: finite_polyhedron_faces polyhedron_imp_closed polyhedron_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2658 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2659 | assume ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2660 | then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2661 | by (force simp: polyhedron_eq_finite_exposed_faces exposed_face_of intro: finite_subset) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2662 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2663 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2664 | lemma polyhedron_linear_image_eq: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2665 | fixes h :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2666 | assumes "linear h" "bij h" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2667 | shows "polyhedron (h ` S) \<longleftrightarrow> polyhedron S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2668 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2669 |   have *: "{f. P f} = (image h) ` {f. P (h ` f)}" for P
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2670 | apply safe | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2671 | apply (rule_tac x="inv h ` x" in image_eqI) | 
| 63807 | 2672 | apply (auto simp: \<open>bij h\<close> bij_is_surj image_f_inv_f) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2673 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2674 | have "inj h" using bij_is_inj assms by blast | 
| 67399 | 2675 | then have injim: "inj_on ((`) h) A" for A | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2676 | by (simp add: inj_on_def inj_image_eq_iff) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2677 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2678 | using \<open>linear h\<close> \<open>inj h\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2679 | apply (simp add: polyhedron_eq_finite_faces closed_injective_linear_image_eq) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2680 | apply (simp add: * face_of_linear_image [of h _ S, symmetric] finite_image_iff injim) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2681 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2682 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2683 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2684 | lemma polyhedron_negations: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2685 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2686 | shows "polyhedron S \<Longrightarrow> polyhedron(image uminus S)" | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 2687 | by (subst polyhedron_linear_image_eq) | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 2688 | (auto simp: bij_uminus intro!: linear_uminus) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2689 | |
| 69683 | 2690 | subsection\<open>Relation between polytopes and polyhedra\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 2691 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2692 | proposition polytope_eq_bounded_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2693 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2694 | shows "polytope S \<longleftrightarrow> polyhedron S \<and> bounded S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2695 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2696 | proof | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2697 | assume ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2698 | then show ?rhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2699 | by (simp add: finite_polytope_faces polyhedron_eq_finite_faces | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2700 | polytope_imp_closed polytope_imp_convex polytope_imp_bounded) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2701 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2702 | assume ?rhs then show ?lhs | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2703 | unfolding polytope_def | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2704 |     apply (rule_tac x="{v. v extreme_point_of S}" in exI)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2705 | apply (simp add: finite_polyhedron_extreme_points Krein_Milman_Minkowski compact_eq_bounded_closed polyhedron_imp_closed polyhedron_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2706 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2707 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2708 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2709 | lemma polytope_Int: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2710 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2711 | shows "\<lbrakk>polytope S; polytope T\<rbrakk> \<Longrightarrow> polytope(S \<inter> T)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2712 | by (simp add: polytope_eq_bounded_polyhedron bounded_Int) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2713 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2714 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2715 | lemma polytope_Int_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2716 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2717 | shows "\<lbrakk>polytope S; polyhedron T\<rbrakk> \<Longrightarrow> polytope(S \<inter> T)" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2718 | by (simp add: bounded_Int polytope_eq_bounded_polyhedron) | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2719 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2720 | lemma polyhedron_Int_polytope: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2721 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2722 | shows "\<lbrakk>polyhedron S; polytope T\<rbrakk> \<Longrightarrow> polytope(S \<inter> T)" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2723 | by (simp add: bounded_Int polytope_eq_bounded_polyhedron) | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2724 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2725 | lemma polytope_imp_polyhedron: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2726 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2727 | shows "polytope S \<Longrightarrow> polyhedron S" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2728 | by (simp add: polytope_eq_bounded_polyhedron) | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2729 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2730 | lemma polytope_facet_exists: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2731 | fixes p :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2732 | assumes "polytope p" "0 < aff_dim p" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2733 | obtains F where "F facet_of p" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2734 | proof (cases "p = {}")
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2735 | case True with assms show ?thesis by auto | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2736 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2737 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2738 | then obtain v where "v extreme_point_of p" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2739 | using extreme_point_exists_convex | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2740 | by (blast intro: \<open>polytope p\<close> polytope_imp_compact polytope_imp_convex) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2741 | then | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2742 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2743 | by (metis face_of_polyhedron_subset_facet polytope_imp_polyhedron aff_dim_sing | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2744 | all_not_in_conv assms face_of_singleton less_irrefl singletonI that) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2745 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2746 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2747 | lemma polyhedron_interval [iff]: "polyhedron(cbox a b)" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2748 | by (metis polytope_imp_polyhedron polytope_interval) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2749 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 2750 | lemma polyhedron_convex_hull: | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2751 | fixes S :: "'a :: euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2752 | shows "finite S \<Longrightarrow> polyhedron(convex hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2753 | by (simp add: polytope_convex_hull polytope_imp_polyhedron) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2754 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2755 | |
| 69683 | 2756 | subsection\<open>Relative and absolute frontier of a polytope\<close> | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2757 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2758 | lemma rel_boundary_of_convex_hull: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2759 | fixes S :: "'a::euclidean_space set" | 
| 69508 | 2760 | assumes "\<not> affine_dependent S" | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2761 |       shows "(convex hull S) - rel_interior(convex hull S) = (\<Union>a\<in>S. convex hull (S - {a}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2762 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2763 | have "finite S" by (metis assms aff_independent_finite) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2764 | then consider "card S = 0" | "card S = 1" | "2 \<le> card S" by arith | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2765 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2766 | proof cases | 
| 63145 | 2767 |     case 1 then have "S = {}" by (simp add: \<open>finite S\<close>)
 | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2768 | then show ?thesis by simp | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2769 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2770 | case 2 show ?thesis | 
| 63145 | 2771 | by (auto intro: card_1_singletonE [OF \<open>card S = 1\<close>]) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2772 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2773 | case 3 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2774 | with assms show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2775 | by (auto simp: polyhedron_convex_hull rel_boundary_of_polyhedron facet_of_convex_hull_affine_independent_alt \<open>finite S\<close>) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2776 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2777 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2778 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2779 | proposition frontier_of_convex_hull: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2780 | fixes S :: "'a::euclidean_space set" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2781 |     assumes "card S = Suc (DIM('a))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2782 |       shows "frontier(convex hull S) = \<Union> {convex hull (S - {a}) | a. a \<in> S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2783 | proof (cases "affine_dependent S") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2784 | case True | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2785 | have [iff]: "finite S" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2786 | using assms using card_infinite by force | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2787 | then have ccs: "closed (convex hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2788 | by (simp add: compact_imp_closed finite_imp_compact_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2789 |     { fix x T
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2790 | assume "finite T" "T \<subseteq> S" "int (card T) \<le> aff_dim S + 1" "x \<in> convex hull T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2791 | then have "S \<noteq> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2792 | using True \<open>finite S\<close> aff_dim_le_card affine_independent_iff_card by fastforce | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2793 | then obtain a where "a \<in> S" "a \<notin> T" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2794 | using \<open>T \<subseteq> S\<close> by blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2795 |       then have "x \<in> (\<Union>a\<in>S. convex hull (S - {a}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2796 | using True affine_independent_iff_card [of S] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2797 | apply simp | 
| 63145 | 2798 | apply (metis (no_types, hide_lams) Diff_eq_empty_iff Diff_insert0 \<open>a \<notin> T\<close> \<open>T \<subseteq> S\<close> \<open>x \<in> convex hull T\<close> hull_mono insert_Diff_single subsetCE) | 
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2799 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2800 | } note * = this | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2801 |     have 1: "convex hull S \<subseteq> (\<Union> a\<in>S. convex hull (S - {a}))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2802 | apply (subst caratheodory_aff_dim) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2803 | apply (blast intro: *) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2804 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2805 |     have 2: "\<Union>((\<lambda>a. convex hull (S - {a})) ` S) \<subseteq> convex hull S"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2806 | by (rule Union_least) (metis (no_types, lifting) Diff_subset hull_mono imageE) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2807 | show ?thesis using True | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2808 | apply (simp add: segment_convex_hull frontier_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2809 | using interior_convex_hull_eq_empty [OF assms] | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2810 | apply (simp add: closure_closed [OF ccs]) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2811 | apply (rule subset_antisym) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2812 | using 1 apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2813 | using 2 apply blast | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2814 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2815 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2816 | case False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2817 | then have "frontier (convex hull S) = (convex hull S) - rel_interior(convex hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2818 | apply (simp add: rel_boundary_of_convex_hull [symmetric] frontier_def) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2819 | by (metis aff_independent_finite assms closure_convex_hull finite_imp_compact_convex_hull hull_hull interior_convex_hull_eq_empty rel_interior_nonempty_interior) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2820 |   also have "... = \<Union>{convex hull (S - {a}) |a. a \<in> S}"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2821 | proof - | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2822 | have "convex hull S - rel_interior (convex hull S) = rel_frontier (convex hull S)" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2823 | by (simp add: False aff_independent_finite polyhedron_convex_hull rel_boundary_of_polyhedron rel_frontier_of_polyhedron) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2824 | then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2825 | by (simp add: False rel_frontier_convex_hull_cases) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2826 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2827 | finally show ?thesis . | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2828 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2829 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2830 | subsection\<open>Special case of a triangle\<close> | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2831 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2832 | proposition frontier_of_triangle: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2833 | fixes a :: "'a::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2834 |     assumes "DIM('a) = 2"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2835 |     shows "frontier(convex hull {a,b,c}) = closed_segment a b \<union> closed_segment b c \<union> closed_segment c a"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2836 | (is "?lhs = ?rhs") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2837 | proof (cases "b = a \<or> c = a \<or> c = b") | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2838 | case True then show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2839 | by (auto simp: assms segment_convex_hull frontier_def empty_interior_convex_hull insert_commute card_insert_le_m1 hull_inc insert_absorb) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2840 | next | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2841 |   case False then have [simp]: "card {a, b, c} = Suc (DIM('a))"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2842 | by (simp add: card_insert Set.insert_Diff_if assms) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2843 | show ?thesis | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2844 | proof | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2845 | show "?lhs \<subseteq> ?rhs" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2846 | using False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2847 | by (force simp: segment_convex_hull frontier_of_convex_hull insert_Diff_if insert_commute split: if_split_asm) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2848 | show "?rhs \<subseteq> ?lhs" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2849 | using False | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2850 | apply (simp add: frontier_of_convex_hull segment_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2851 | apply (intro conjI subsetI) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2852 |         apply (rule_tac X="convex hull {a,b}" in UnionI; force simp: Set.insert_Diff_if)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2853 |        apply (rule_tac X="convex hull {b,c}" in UnionI; force)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2854 |       apply (rule_tac X="convex hull {a,c}" in UnionI; force simp: insert_commute Set.insert_Diff_if)
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2855 | done | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2856 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2857 | qed | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2858 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2859 | corollary inside_of_triangle: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2860 | fixes a :: "'a::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2861 |     assumes "DIM('a) = 2"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2862 |     shows "inside (closed_segment a b \<union> closed_segment b c \<union> closed_segment c a) = interior(convex hull {a,b,c})"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2863 | by (metis assms frontier_of_triangle bounded_empty bounded_insert convex_convex_hull inside_frontier_eq_interior bounded_convex_hull) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2864 | |
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2865 | corollary interior_of_triangle: | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2866 | fixes a :: "'a::euclidean_space" | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2867 |     assumes "DIM('a) = 2"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2868 |     shows "interior(convex hull {a,b,c}) =
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2869 |            convex hull {a,b,c} - (closed_segment a b \<union> closed_segment b c \<union> closed_segment c a)"
 | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2870 | using interior_subset | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2871 | by (force simp: frontier_of_triangle [OF assms, symmetric] frontier_def Diff_Diff_Int) | 
| 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2872 | |
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2873 | subsection\<open>Subdividing a cell complex\<close> | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2874 | |
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2875 | lemma subdivide_interval: | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2876 | fixes x::real | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2877 | assumes "a < \<bar>x - y\<bar>" "0 < a" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2878 | obtains n where "n \<in> \<int>" "x < n * a \<and> n * a < y \<or> y < n * a \<and> n * a < x" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2879 | proof - | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2880 | consider "a + x < y" | "a + y < x" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2881 | using assms by linarith | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2882 | then show ?thesis | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2883 | proof cases | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2884 | case 1 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2885 | let ?n = "of_int (floor (x/a)) + 1" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2886 | have x: "x < ?n * a" | 
| 66515 | 2887 | by (meson \<open>0 < a\<close> divide_less_eq floor_eq_iff) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2888 | have "?n * a \<le> a + x" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2889 | apply (simp add: algebra_simps) | 
| 64240 | 2890 | by (metis \<open>0 < a\<close> floor_correct less_irrefl nonzero_mult_div_cancel_left real_mult_le_cancel_iff2 times_divide_eq_right) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2891 | also have "... < y" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2892 | by (rule 1) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2893 | finally have "?n * a < y" . | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2894 | with x show ?thesis | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2895 | using Ints_1 Ints_add Ints_of_int that by blast | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2896 | next | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2897 | case 2 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2898 | let ?n = "of_int (floor (y/a)) + 1" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2899 | have y: "y < ?n * a" | 
| 66515 | 2900 | by (meson \<open>0 < a\<close> divide_less_eq floor_eq_iff) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2901 | have "?n * a \<le> a + y" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2902 | apply (simp add: algebra_simps) | 
| 64240 | 2903 | by (metis \<open>0 < a\<close> floor_correct less_irrefl nonzero_mult_div_cancel_left real_mult_le_cancel_iff2 times_divide_eq_right) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2904 | also have "... < x" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2905 | by (rule 2) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2906 | finally have "?n * a < x" . | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2907 | then show ?thesis | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2908 | using Ints_1 Ints_add Ints_of_int that y by blast | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2909 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2910 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2911 | |
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2912 | lemma cell_subdivision_lemma: | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2913 | assumes "finite \<F>" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2914 | and "\<And>X. X \<in> \<F> \<Longrightarrow> polytope X" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2915 | and "\<And>X. X \<in> \<F> \<Longrightarrow> aff_dim X \<le> d" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2916 | and "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>\<rbrakk> \<Longrightarrow> (X \<inter> Y) face_of X \<and> (X \<inter> Y) face_of Y" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2917 | and "finite I" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2918 | shows "\<exists>\<G>. \<Union>\<G> = \<Union>\<F> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2919 | finite \<G> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2920 | (\<forall>C \<in> \<G>. \<exists>D. D \<in> \<F> \<and> C \<subseteq> D) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2921 | (\<forall>C \<in> \<F>. \<forall>x \<in> C. \<exists>D. D \<in> \<G> \<and> x \<in> D \<and> D \<subseteq> C) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2922 | (\<forall>X \<in> \<G>. polytope X) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2923 | (\<forall>X \<in> \<G>. aff_dim X \<le> d) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2924 | (\<forall>X \<in> \<G>. \<forall>Y \<in> \<G>. X \<inter> Y face_of X \<and> X \<inter> Y face_of Y) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2925 | (\<forall>X \<in> \<G>. \<forall>x \<in> X. \<forall>y \<in> X. \<forall>a b. | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2926 | (a,b) \<in> I \<longrightarrow> a \<bullet> x \<le> b \<and> a \<bullet> y \<le> b \<or> | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2927 | a \<bullet> x \<ge> b \<and> a \<bullet> y \<ge> b)" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2928 | using \<open>finite I\<close> | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2929 | proof induction | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2930 | case empty | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2931 | then show ?case | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2932 | by (rule_tac x="\<F>" in exI) (auto simp: assms) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2933 | next | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2934 | case (insert ab I) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2935 | then obtain \<G> where eq: "\<Union>\<G> = \<Union>\<F>" and "finite \<G>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2936 | and sub1: "\<And>C. C \<in> \<G> \<Longrightarrow> \<exists>D. D \<in> \<F> \<and> C \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2937 | and sub2: "\<And>C x. C \<in> \<F> \<and> x \<in> C \<Longrightarrow> \<exists>D. D \<in> \<G> \<and> x \<in> D \<and> D \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2938 | and poly: "\<And>X. X \<in> \<G> \<Longrightarrow> polytope X" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2939 | and aff: "\<And>X. X \<in> \<G> \<Longrightarrow> aff_dim X \<le> d" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2940 | and face: "\<And>X Y. \<lbrakk>X \<in> \<G>; Y \<in> \<G>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2941 | and I: "\<And>X x y a b. \<lbrakk>X \<in> \<G>; x \<in> X; y \<in> X; (a,b) \<in> I\<rbrakk> \<Longrightarrow> | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2942 | a \<bullet> x \<le> b \<and> a \<bullet> y \<le> b \<or> a \<bullet> x \<ge> b \<and> a \<bullet> y \<ge> b" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2943 | by (auto simp: that) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2944 | obtain a b where "ab = (a,b)" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2945 | by fastforce | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2946 |   let ?\<G> = "(\<lambda>X. X \<inter> {x. a \<bullet> x \<le> b}) ` \<G> \<union> (\<lambda>X. X \<inter> {x. a \<bullet> x \<ge> b}) ` \<G>"
 | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2947 | have eqInt: "(S \<inter> Collect P) \<inter> (T \<inter> Collect Q) = (S \<inter> T) \<inter> (Collect P \<inter> Collect Q)" for S T::"'a set" and P Q | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2948 | by blast | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2949 | show ?case | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2950 | proof (intro conjI exI) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2951 | show "\<Union>?\<G> = \<Union>\<F>" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2952 | by (force simp: eq [symmetric]) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2953 | show "finite ?\<G>" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2954 | using \<open>finite \<G>\<close> by force | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2955 | show "\<forall>X \<in> ?\<G>. polytope X" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2956 | by (force simp: poly polytope_Int_polyhedron polyhedron_halfspace_le polyhedron_halfspace_ge) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2957 | show "\<forall>X \<in> ?\<G>. aff_dim X \<le> d" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2958 | by (auto; metis order_trans aff aff_dim_subset inf_le1) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2959 | show "\<forall>X \<in> ?\<G>. \<forall>x \<in> X. \<forall>y \<in> X. \<forall>a b. | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2960 | (a,b) \<in> insert ab I \<longrightarrow> a \<bullet> x \<le> b \<and> a \<bullet> y \<le> b \<or> | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2961 | a \<bullet> x \<ge> b \<and> a \<bullet> y \<ge> b" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2962 | using \<open>ab = (a, b)\<close> I by fastforce | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2963 | show "\<forall>X \<in> ?\<G>. \<forall>Y \<in> ?\<G>. X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2964 | by (auto simp: eqInt halfspace_Int_eq face_of_Int_Int face face_of_halfspace_le face_of_halfspace_ge) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2965 | show "\<forall>C \<in> ?\<G>. \<exists>D. D \<in> \<F> \<and> C \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2966 | using sub1 by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2967 | show "\<forall>C\<in>\<F>. \<forall>x\<in>C. \<exists>D. D \<in> ?\<G> \<and> x \<in> D \<and> D \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2968 | proof (intro ballI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2969 | fix C z | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2970 | assume "C \<in> \<F>" "z \<in> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2971 | with sub2 obtain D where D: "D \<in> \<G>" "z \<in> D" "D \<subseteq> C" by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2972 |       have "D \<in> \<G> \<and> z \<in> D \<inter> {x. a \<bullet> x \<le> b} \<and> D \<inter> {x. a \<bullet> x \<le> b} \<subseteq> C \<or>
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2973 |             D \<in> \<G> \<and> z \<in> D \<inter> {x. a \<bullet> x \<ge> b} \<and> D \<inter> {x. a \<bullet> x \<ge> b} \<subseteq> C"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2974 | using linorder_class.linear [of "a \<bullet> z" b] D by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2975 | then show "\<exists>D. D \<in> ?\<G> \<and> z \<in> D \<and> D \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2976 | by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2977 | qed | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2978 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2979 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2980 | |
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2981 | |
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2982 | proposition cell_complex_subdivision_exists: | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2983 | fixes \<F> :: "'a::euclidean_space set set" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2984 | assumes "0 < e" "finite \<F>" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2985 | and poly: "\<And>X. X \<in> \<F> \<Longrightarrow> polytope X" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2986 | and aff: "\<And>X. X \<in> \<F> \<Longrightarrow> aff_dim X \<le> d" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2987 | and face: "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2988 | obtains "\<F>'" where "finite \<F>'" "\<Union>\<F>' = \<Union>\<F>" "\<And>X. X \<in> \<F>' \<Longrightarrow> diameter X < e" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2989 | "\<And>X. X \<in> \<F>' \<Longrightarrow> polytope X" "\<And>X. X \<in> \<F>' \<Longrightarrow> aff_dim X \<le> d" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2990 | "\<And>X Y. \<lbrakk>X \<in> \<F>'; Y \<in> \<F>'\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2991 | "\<And>C. C \<in> \<F>' \<Longrightarrow> \<exists>D. D \<in> \<F> \<and> C \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 2992 | "\<And>C x. C \<in> \<F> \<and> x \<in> C \<Longrightarrow> \<exists>D. D \<in> \<F>' \<and> x \<in> D \<and> D \<subseteq> C" | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2993 | proof - | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2994 | have "bounded(\<Union>\<F>)" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2995 | by (simp add: \<open>finite \<F>\<close> poly bounded_Union polytope_imp_bounded) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2996 | then obtain B where "B > 0" and B: "\<And>x. x \<in> \<Union>\<F> \<Longrightarrow> norm x < B" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2997 | by (meson bounded_pos_less) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2998 |   define C where "C \<equiv> {z \<in> \<int>. \<bar>z * e / 2 / real DIM('a)\<bar> \<le> B}"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 2999 |   define I where "I \<equiv> \<Union>i \<in> Basis. \<Union>j \<in> C. { (i::'a, j * e / 2 / DIM('a)) }"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3000 | have "finite C" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3001 |     using finite_int_segment [of "-B / (e / 2 / DIM('a))" "B / (e / 2 / DIM('a))"]
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3002 | apply (simp add: C_def) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3003 | apply (erule rev_finite_subset) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3004 | using \<open>0 < e\<close> | 
| 70817 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 haftmann parents: 
70641diff
changeset | 3005 | apply (auto simp: field_split_simps) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3006 | done | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3007 | then have "finite I" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3008 | by (simp add: I_def) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3009 | obtain \<F>' where eq: "\<Union>\<F>' = \<Union>\<F>" and "finite \<F>'" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3010 | and poly: "\<And>X. X \<in> \<F>' \<Longrightarrow> polytope X" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3011 | and aff: "\<And>X. X \<in> \<F>' \<Longrightarrow> aff_dim X \<le> d" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3012 | and face: "\<And>X Y. \<lbrakk>X \<in> \<F>'; Y \<in> \<F>'\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3013 | and I: "\<And>X x y a b. \<lbrakk>X \<in> \<F>'; x \<in> X; y \<in> X; (a,b) \<in> I\<rbrakk> \<Longrightarrow> | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3014 | a \<bullet> x \<le> b \<and> a \<bullet> y \<le> b \<or> a \<bullet> x \<ge> b \<and> a \<bullet> y \<ge> b" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3015 | and sub1: "\<And>C. C \<in> \<F>' \<Longrightarrow> \<exists>D. D \<in> \<F> \<and> C \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3016 | and sub2: "\<And>C x. C \<in> \<F> \<and> x \<in> C \<Longrightarrow> \<exists>D. D \<in> \<F>' \<and> x \<in> D \<and> D \<subseteq> C" | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3017 | apply (rule exE [OF cell_subdivision_lemma]) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3018 | using assms \<open>finite I\<close> apply auto | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3019 | done | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3020 | show ?thesis | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3021 | proof (rule_tac \<F>'="\<F>'" in that) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3022 | show "diameter X < e" if "X \<in> \<F>'" for X | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3023 | proof - | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3024 | have "diameter X \<le> e/2" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3025 | proof (rule diameter_le) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3026 | show "norm (x - y) \<le> e / 2" if "x \<in> X" "y \<in> X" for x y | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3027 | proof - | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3028 | have "norm x < B" "norm y < B" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3029 | using B \<open>X \<in> \<F>'\<close> eq that by fastforce+ | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3030 | have "norm (x - y) \<le> (\<Sum>b\<in>Basis. \<bar>(x-y) \<bullet> b\<bar>)" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3031 | by (rule norm_le_l1) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3032 |           also have "... \<le> of_nat (DIM('a)) * (e / 2 / DIM('a))"
 | 
| 64267 | 3033 | proof (rule sum_bounded_above) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3034 | fix i::'a | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3035 | assume "i \<in> Basis" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3036 |             then have I': "\<And>z b. \<lbrakk>z \<in> C; b = z * e / (2 * real DIM('a))\<rbrakk> \<Longrightarrow> i \<bullet> x \<le> b \<and> i \<bullet> y \<le> b \<or> i \<bullet> x \<ge> b \<and> i \<bullet> y \<ge> b"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3037 | using I \<open>X \<in> \<F>'\<close> that | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3038 | by (fastforce simp: I_def) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3039 |             show "\<bar>(x - y) \<bullet> i\<bar> \<le> e / 2 / real DIM('a)"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3040 | proof (rule ccontr) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3041 |               assume "\<not> \<bar>(x - y) \<bullet> i\<bar> \<le> e / 2 / real DIM('a)"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3042 |               then have xyi: "\<bar>i \<bullet> x - i \<bullet> y\<bar> > e / 2 / real DIM('a)"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3043 | by (simp add: inner_commute inner_diff_right) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3044 |               obtain n where "n \<in> \<int>" and n: "i \<bullet> x < n * (e / 2 / real DIM('a)) \<and> n * (e / 2 / real DIM('a)) < i \<bullet> y \<or> i \<bullet> y < n * (e / 2 / real DIM('a)) \<and> n * (e / 2 / real DIM('a)) < i \<bullet> x"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3045 | using subdivide_interval [OF xyi] DIM_positive \<open>0 < e\<close> | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3046 | by (auto simp: zero_less_divide_iff) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3047 | have "\<bar>i \<bullet> x\<bar> < B" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3048 | by (metis \<open>i \<in> Basis\<close> \<open>norm x < B\<close> inner_commute norm_bound_Basis_lt) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3049 | have "\<bar>i \<bullet> y\<bar> < B" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3050 | by (metis \<open>i \<in> Basis\<close> \<open>norm y < B\<close> inner_commute norm_bound_Basis_lt) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3051 |               have *: "\<bar>n * e\<bar> \<le> B * (2 * real DIM('a))"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3052 | if "\<bar>ix\<bar> < B" "\<bar>iy\<bar> < B" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3053 |                          and ix: "ix * (2 * real DIM('a)) < n * e"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3054 |                          and iy: "n * e < iy * (2 * real DIM('a))" for ix iy
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3055 | proof (rule abs_leI) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3056 |                 have "iy * (2 * real DIM('a)) \<le> B * (2 * real DIM('a))"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3057 | by (rule mult_right_mono) (use \<open>\<bar>iy\<bar> < B\<close> in linarith)+ | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3058 |                 then show "n * e \<le> B * (2 * real DIM('a))"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3059 | using iy by linarith | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3060 | next | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3061 |                 have "- ix * (2 * real DIM('a)) \<le> B * (2 * real DIM('a))"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3062 | by (rule mult_right_mono) (use \<open>\<bar>ix\<bar> < B\<close> in linarith)+ | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3063 |                 then show "- (n * e) \<le> B * (2 * real DIM('a))"
 | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3064 | using ix by linarith | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3065 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3066 | have "n \<in> C" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3067 | using \<open>n \<in> \<int>\<close> n by (auto simp: C_def divide_simps intro: * \<open>\<bar>i \<bullet> x\<bar> < B\<close> \<open>\<bar>i \<bullet> y\<bar> < B\<close>) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3068 | show False | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3069 | using I' [OF \<open>n \<in> C\<close> refl] n by auto | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3070 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3071 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3072 | also have "... = e / 2" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3073 | by simp | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3074 | finally show ?thesis . | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3075 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3076 | qed (use \<open>0 < e\<close> in force) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3077 | also have "... < e" | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3078 | by (simp add: \<open>0 < e\<close>) | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3079 | finally show ?thesis . | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3080 | qed | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3081 | qed (auto simp: eq poly aff face sub1 sub2 \<open>finite \<F>'\<close>) | 
| 63967 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3082 | qed | 
| 
2aa42596edc3
new material on paths, etc. Also rationalisation
 paulson <lp15@cam.ac.uk> parents: 
63918diff
changeset | 3083 | |
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3084 | |
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3085 | subsection\<open>Simplexes\<close> | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3086 | |
| 69597 | 3087 | text\<open>The notion of n-simplex for integer \<^term>\<open>n \<ge> -1\<close>\<close> | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3088 | |
| 70136 | 3089 | definition\<^marker>\<open>tag important\<close> simplex :: "int \<Rightarrow> 'a::euclidean_space set \<Rightarrow> bool" (infix "simplex" 50) | 
| 69508 | 3090 | where "n simplex S \<equiv> \<exists>C. \<not> affine_dependent C \<and> int(card C) = n + 1 \<and> S = convex hull C" | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3091 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3092 | lemma simplex: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3093 | "n simplex S \<longleftrightarrow> (\<exists>C. finite C \<and> | 
| 69508 | 3094 | \<not> affine_dependent C \<and> | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3095 | int(card C) = n + 1 \<and> | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3096 | S = convex hull C)" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3097 | by (auto simp add: simplex_def intro: aff_independent_finite) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3098 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3099 | lemma simplex_convex_hull: | 
| 69508 | 3100 | "\<not> affine_dependent C \<and> int(card C) = n + 1 \<Longrightarrow> n simplex (convex hull C)" | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3101 | by (auto simp add: simplex_def) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3102 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3103 | lemma convex_simplex: "n simplex S \<Longrightarrow> convex S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3104 | by (metis convex_convex_hull simplex_def) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3105 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3106 | lemma compact_simplex: "n simplex S \<Longrightarrow> compact S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3107 | unfolding simplex | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3108 | using finite_imp_compact_convex_hull by blast | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3109 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3110 | lemma closed_simplex: "n simplex S \<Longrightarrow> closed S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3111 | by (simp add: compact_imp_closed compact_simplex) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3112 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3113 | lemma simplex_imp_polytope: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3114 | "n simplex S \<Longrightarrow> polytope S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3115 | unfolding simplex_def polytope_def | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3116 | using aff_independent_finite by blast | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3117 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3118 | lemma simplex_imp_polyhedron: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3119 | "n simplex S \<Longrightarrow> polyhedron S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3120 | by (simp add: polytope_imp_polyhedron simplex_imp_polytope) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3121 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3122 | lemma simplex_dim_ge: "n simplex S \<Longrightarrow> -1 \<le> n" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3123 | by (metis (no_types, hide_lams) aff_dim_geq affine_independent_iff_card diff_add_cancel diff_diff_eq2 simplex_def) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3124 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3125 | lemma simplex_empty [simp]: "n simplex {} \<longleftrightarrow> n = -1"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3126 | proof | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3127 |   assume "n simplex {}"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3128 | then show "n = -1" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3129 | unfolding simplex by (metis card_empty convex_hull_eq_empty diff_0 diff_eq_eq of_nat_0) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3130 | next | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3131 |   assume "n = -1" then show "n simplex {}"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3132 | by (fastforce simp: simplex) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3133 | qed | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3134 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3135 | lemma simplex_minus_1 [simp]: "-1 simplex S \<longleftrightarrow> S = {}"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3136 | by (metis simplex cancel_comm_monoid_add_class.diff_cancel card_0_eq diff_minus_eq_add of_nat_eq_0_iff simplex_empty) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3137 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3138 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3139 | lemma aff_dim_simplex: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3140 | "n simplex S \<Longrightarrow> aff_dim S = n" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3141 | by (metis simplex add.commute add_diff_cancel_left' aff_dim_convex_hull affine_independent_iff_card) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3142 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3143 | lemma zero_simplex_sing: "0 simplex {a}"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3144 | apply (simp add: simplex_def) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3145 | by (metis affine_independent_1 card_empty card_insert_disjoint convex_hull_singleton empty_iff finite.emptyI) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3146 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3147 | lemma simplex_sing [simp]: "n simplex {a} \<longleftrightarrow> n = 0"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3148 | using aff_dim_simplex aff_dim_sing zero_simplex_sing by blast | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3149 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3150 | lemma simplex_zero: "0 simplex S \<longleftrightarrow> (\<exists>a. S = {a})"
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3151 | apply (auto simp: ) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3152 | using aff_dim_eq_0 aff_dim_simplex by blast | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3153 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3154 | lemma one_simplex_segment: "a \<noteq> b \<Longrightarrow> 1 simplex closed_segment a b" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3155 | apply (simp add: simplex_def) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3156 |   apply (rule_tac x="{a,b}" in exI)
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3157 | apply (auto simp: segment_convex_hull) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3158 | done | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3159 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3160 | lemma simplex_segment_cases: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3161 | "(if a = b then 0 else 1) simplex closed_segment a b" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3162 | by (auto simp: one_simplex_segment) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3163 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3164 | lemma simplex_segment: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3165 | "\<exists>n. n simplex closed_segment a b" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3166 | using simplex_segment_cases by metis | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3167 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3168 | lemma polytope_lowdim_imp_simplex: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3169 | assumes "polytope P" "aff_dim P \<le> 1" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3170 | obtains n where "n simplex P" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3171 | proof (cases "P = {}")
 | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3172 | case True | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3173 | then show ?thesis | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3174 | by (simp add: that) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3175 | next | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3176 | case False | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3177 | then show ?thesis | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3178 | by (metis assms compact_convex_collinear_segment collinear_aff_dim polytope_imp_compact polytope_imp_convex simplex_segment_cases that) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3179 | qed | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3180 | |
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3181 | lemma simplex_insert_dimplus1: | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3182 | fixes n::int | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3183 | assumes "n simplex S" and a: "a \<notin> affine hull S" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3184 | shows "(n+1) simplex (convex hull (insert a S))" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3185 | proof - | 
| 69508 | 3186 | obtain C where C: "finite C" "\<not> affine_dependent C" "int(card C) = n+1" and S: "S = convex hull C" | 
| 66287 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3187 | using assms unfolding simplex by force | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3188 | show ?thesis | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3189 | unfolding simplex | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3190 | proof (intro exI conjI) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3191 | have "aff_dim S = n" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3192 | using aff_dim_simplex assms(1) by blast | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3193 | moreover have "a \<notin> affine hull C" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3194 | using S a affine_hull_convex_hull by blast | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3195 | moreover have "a \<notin> C" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3196 | using S a hull_inc by fastforce | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3197 | ultimately show "\<not> affine_dependent (insert a C)" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3198 | by (simp add: C S aff_dim_convex_hull aff_dim_insert affine_independent_iff_card) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3199 | next | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3200 | have "a \<notin> C" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3201 | using S a hull_inc by fastforce | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3202 | then show "int (card (insert a C)) = n + 1 + 1" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3203 | by (simp add: C) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3204 | next | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3205 | show "convex hull insert a S = convex hull (insert a C)" | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3206 | by (simp add: S convex_hull_insert_segments) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3207 | qed (use C in auto) | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3208 | qed | 
| 
005a30862ed0
new material: Colinearity, convex sets, polytopes
 paulson <lp15@cam.ac.uk> parents: 
65680diff
changeset | 3209 | |
| 69683 | 3210 | subsection \<open>Simplicial complexes and triangulations\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 3211 | |
| 70136 | 3212 | definition\<^marker>\<open>tag important\<close> simplicial_complex where | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3213 | "simplicial_complex \<C> \<equiv> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3214 | finite \<C> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3215 | (\<forall>S \<in> \<C>. \<exists>n. n simplex S) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3216 | (\<forall>F S. S \<in> \<C> \<and> F face_of S \<longrightarrow> F \<in> \<C>) \<and> | 
| 67613 | 3217 | (\<forall>S S'. S \<in> \<C> \<and> S' \<in> \<C> | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3218 | \<longrightarrow> (S \<inter> S') face_of S \<and> (S \<inter> S') face_of S')" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3219 | |
| 70136 | 3220 | definition\<^marker>\<open>tag important\<close> triangulation where | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3221 | "triangulation \<T> \<equiv> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3222 | finite \<T> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3223 | (\<forall>T \<in> \<T>. \<exists>n. n simplex T) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3224 | (\<forall>T T'. T \<in> \<T> \<and> T' \<in> \<T> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3225 | \<longrightarrow> (T \<inter> T') face_of T \<and> (T \<inter> T') face_of T')" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3226 | |
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3227 | |
| 69683 | 3228 | subsection\<open>Refining a cell complex to a simplicial complex\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 3229 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3230 | proposition convex_hull_insert_Int_eq: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3231 | fixes z :: "'a :: euclidean_space" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3232 | assumes z: "z \<in> rel_interior S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3233 | and T: "T \<subseteq> rel_frontier S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3234 | and U: "U \<subseteq> rel_frontier S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3235 | and "convex S" "convex T" "convex U" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3236 | shows "convex hull (insert z T) \<inter> convex hull (insert z U) = convex hull (insert z (T \<inter> U))" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3237 | (is "?lhs = ?rhs") | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3238 | proof | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3239 | show "?lhs \<subseteq> ?rhs" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3240 |   proof (cases "T={} \<or> U={}")
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3241 | case True then show ?thesis by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3242 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3243 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3244 |     then have "T \<noteq> {}" "U \<noteq> {}" by auto
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3245 | have TU: "convex (T \<inter> U)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3246 | by (simp add: \<open>convex T\<close> \<open>convex U\<close> convex_Int) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3247 | have "(\<Union>x\<in>T. closed_segment z x) \<inter> (\<Union>x\<in>U. closed_segment z x) | 
| 69313 | 3248 |           \<subseteq> (if T \<inter> U = {} then {z} else \<Union>((closed_segment z) ` (T \<inter> U)))" (is "_ \<subseteq> ?IF")
 | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3249 | proof clarify | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3250 | fix x t u | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3251 | assume xt: "x \<in> closed_segment z t" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3252 | and xu: "x \<in> closed_segment z u" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3253 | and "t \<in> T" "u \<in> U" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3254 | then have ne: "t \<noteq> z" "u \<noteq> z" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3255 | using T U z unfolding rel_frontier_def by blast+ | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3256 | show "x \<in> ?IF" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3257 | proof (cases "x = z") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3258 | case True then show ?thesis by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3259 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3260 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3261 | have t: "t \<in> closure S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3262 | using T \<open>t \<in> T\<close> rel_frontier_def by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3263 | have u: "u \<in> closure S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3264 | using U \<open>u \<in> U\<close> rel_frontier_def by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3265 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3266 | proof (cases "t = u") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3267 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3268 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3269 | using \<open>t \<in> T\<close> \<open>u \<in> U\<close> xt by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3270 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3271 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3272 | have tnot: "t \<notin> closed_segment u z" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3273 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3274 | have "t \<in> closure S - rel_interior S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3275 | using T \<open>t \<in> T\<close> rel_frontier_def by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3276 | then have "t \<notin> open_segment z u" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3277 | by (meson DiffD2 rel_interior_closure_convex_segment [OF \<open>convex S\<close> z u] subsetD) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3278 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3279 | by (simp add: \<open>t \<noteq> u\<close> \<open>t \<noteq> z\<close> open_segment_commute open_segment_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3280 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3281 | moreover have "u \<notin> closed_segment z t" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3282 | using rel_interior_closure_convex_segment [OF \<open>convex S\<close> z t] \<open>u \<in> U\<close> \<open>u \<noteq> z\<close> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3283 | U [unfolded rel_frontier_def] tnot | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3284 | by (auto simp: closed_segment_eq_open) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3285 | ultimately | 
| 69508 | 3286 | have "\<not>(between (t,u) z | between (u,z) t | between (z,t) u)" if "x \<noteq> z" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3287 | using that xt xu | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3288 | apply (simp add: between_mem_segment [symmetric]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3289 | by (metis between_commute between_trans_2 between_antisym) | 
| 69508 | 3290 |           then have "\<not> collinear {t, z, u}" if "x \<noteq> z"
 | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3291 | by (auto simp: that collinear_between_cases between_commute) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3292 |           moreover have "collinear {t, z, x}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3293 | by (metis closed_segment_commute collinear_2 collinear_closed_segment collinear_triples ends_in_segment(1) insert_absorb insert_absorb2 xt) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3294 |           moreover have "collinear {z, x, u}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3295 | by (metis closed_segment_commute collinear_2 collinear_closed_segment collinear_triples ends_in_segment(1) insert_absorb insert_absorb2 xu) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3296 | ultimately have False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3297 | using collinear_3_trans [of t z x u] \<open>x \<noteq> z\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3298 | then show ?thesis by metis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3299 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3300 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3301 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3302 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3303 | using False \<open>convex T\<close> \<open>convex U\<close> TU | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3304 | by (simp add: convex_hull_insert_segments hull_same split: if_split_asm) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3305 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3306 | show "?rhs \<subseteq> ?lhs" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3307 | by (metis inf_greatest hull_mono inf.cobounded1 inf.cobounded2 insert_mono) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3308 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3309 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3310 | lemma simplicial_subdivision_aux: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3311 | assumes "finite \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3312 | and "\<And>C. C \<in> \<M> \<Longrightarrow> polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3313 | and "\<And>C. C \<in> \<M> \<Longrightarrow> aff_dim C \<le> of_nat n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3314 | and "\<And>C F. \<lbrakk>C \<in> \<M>; F face_of C\<rbrakk> \<Longrightarrow> F \<in> \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3315 | and "\<And>C1 C2. \<lbrakk>C1 \<in> \<M>; C2 \<in> \<M>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3316 | shows "\<exists>\<T>. simplicial_complex \<T> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3317 | (\<forall>K \<in> \<T>. aff_dim K \<le> of_nat n) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3318 | \<Union>\<T> = \<Union>\<M> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3319 | (\<forall>C \<in> \<M>. \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3320 | (\<forall>K \<in> \<T>. \<exists>C. C \<in> \<M> \<and> K \<subseteq> C)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3321 | using assms | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3322 | proof (induction n arbitrary: \<M> rule: less_induct) | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3323 | case (less n) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3324 | then have poly\<M>: "\<And>C. C \<in> \<M> \<Longrightarrow> polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3325 | and aff\<M>: "\<And>C. C \<in> \<M> \<Longrightarrow> aff_dim C \<le> of_nat n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3326 | and face\<M>: "\<And>C F. \<lbrakk>C \<in> \<M>; F face_of C\<rbrakk> \<Longrightarrow> F \<in> \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3327 | and intface\<M>: "\<And>C1 C2. \<lbrakk>C1 \<in> \<M>; C2 \<in> \<M>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3328 | by metis+ | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3329 | show ?case | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3330 | proof (cases "n \<le> 1") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3331 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3332 | have "\<And>s. \<lbrakk>n \<le> 1; s \<in> \<M>\<rbrakk> \<Longrightarrow> \<exists>m. m simplex s" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3333 | using poly\<M> aff\<M> by (force intro: polytope_lowdim_imp_simplex) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3334 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3335 | unfolding simplicial_complex_def | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3336 | apply (rule_tac x="\<M>" in exI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3337 | using True by (auto simp: less.prems) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3338 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3339 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3340 |     define \<S> where "\<S> \<equiv> {C \<in> \<M>. aff_dim C < n}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3341 | have "finite \<S>" "\<And>C. C \<in> \<S> \<Longrightarrow> polytope C" "\<And>C. C \<in> \<S> \<Longrightarrow> aff_dim C \<le> int (n - 1)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3342 | "\<And>C F. \<lbrakk>C \<in> \<S>; F face_of C\<rbrakk> \<Longrightarrow> F \<in> \<S>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3343 | "\<And>C1 C2. \<lbrakk>C1 \<in> \<S>; C2 \<in> \<S>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3344 | using less.prems | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3345 | apply (auto simp: \<S>_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3346 | by (metis aff_dim_subset face_of_imp_subset less_le not_le) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3347 | with less.IH [of "n-1" \<S>] False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3348 | obtain \<U> where "simplicial_complex \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3349 | and aff_dim\<U>: "\<And>K. K \<in> \<U> \<Longrightarrow> aff_dim K \<le> int (n - 1)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3350 | and "\<Union>\<U> = \<Union>\<S>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3351 | and fin\<U>: "\<And>C. C \<in> \<S> \<Longrightarrow> \<exists>F. finite F \<and> F \<subseteq> \<U> \<and> C = \<Union>F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3352 | and C\<U>: "\<And>K. K \<in> \<U> \<Longrightarrow> \<exists>C. C \<in> \<S> \<and> K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3353 | by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3354 | then have "finite \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3355 | and simpl\<U>: "\<And>S. S \<in> \<U> \<Longrightarrow> \<exists>n. n simplex S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3356 | and face\<U>: "\<And>F S. \<lbrakk>S \<in> \<U>; F face_of S\<rbrakk> \<Longrightarrow> F \<in> \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3357 | and faceI\<U>: "\<And>S S'. \<lbrakk>S \<in> \<U>; S' \<in> \<U>\<rbrakk> \<Longrightarrow> (S \<inter> S') face_of S \<and> (S \<inter> S') face_of S'" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3358 | by (auto simp: simplicial_complex_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3359 |     define \<N> where "\<N> \<equiv> {C \<in> \<M>. aff_dim C = n}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3360 | have "finite \<N>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3361 | by (simp add: \<N>_def less.prems(1)) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3362 | have poly\<N>: "\<And>C. C \<in> \<N> \<Longrightarrow> polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3363 | and convex\<N>: "\<And>C. C \<in> \<N> \<Longrightarrow> convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3364 | and closed\<N>: "\<And>C. C \<in> \<N> \<Longrightarrow> closed C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3365 | by (auto simp: \<N>_def poly\<M> polytope_imp_convex polytope_imp_closed) | 
| 67613 | 3366 | have in_rel_interior: "(SOME z. z \<in> rel_interior C) \<in> rel_interior C" if "C \<in> \<N>" for C | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3367 | using that poly\<M> polytope_imp_convex rel_interior_aff_dim some_in_eq by (fastforce simp: \<N>_def) | 
| 69508 | 3368 | have *: "\<exists>T. \<not> affine_dependent T \<and> card T \<le> n \<and> aff_dim K < n \<and> K = convex hull T" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3369 | if "K \<in> \<U>" for K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3370 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3371 | obtain r where r: "r simplex K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3372 | using \<open>K \<in> \<U>\<close> simpl\<U> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3373 | have "r = aff_dim K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3374 | using \<open>r simplex K\<close> aff_dim_simplex by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3375 | with r | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3376 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3377 | unfolding simplex_def | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3378 | using False \<open>\<And>K. K \<in> \<U> \<Longrightarrow> aff_dim K \<le> int (n - 1)\<close> that by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3379 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3380 |     have ahK_C_disjoint: "affine hull K \<inter> rel_interior C = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3381 | if "C \<in> \<N>" "K \<in> \<U>" "K \<subseteq> rel_frontier C" for C K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3382 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3383 | have "convex C" "closed C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3384 | by (auto simp: convex\<N> closed\<N> \<open>C \<in> \<N>\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3385 | obtain F where F: "F face_of C" and "F \<noteq> C" "K \<subseteq> F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3386 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3387 | obtain L where "L \<in> \<S>" "K \<subseteq> L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3388 | using \<open>K \<in> \<U>\<close> C\<U> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3389 | have "K \<le> rel_frontier C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3390 | by (simp add: \<open>K \<subseteq> rel_frontier C\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3391 | also have "... \<le> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3392 | by (simp add: \<open>closed C\<close> rel_frontier_def subset_iff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3393 | finally have "K \<subseteq> C" . | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3394 | have "L \<inter> C face_of C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3395 | using \<N>_def \<S>_def \<open>C \<in> \<N>\<close> \<open>L \<in> \<S>\<close> intface\<M> by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3396 | moreover have "L \<inter> C \<noteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3397 | using \<open>C \<in> \<N>\<close> \<open>L \<in> \<S>\<close> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3398 | apply (clarsimp simp: \<N>_def \<S>_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3399 | by (metis aff_dim_subset inf_le1 not_le) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3400 | moreover have "K \<subseteq> L \<inter> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3401 | using \<open>C \<in> \<N>\<close> \<open>L \<in> \<S>\<close> \<open>K \<subseteq> C\<close> \<open>K \<subseteq> L\<close> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3402 | by (auto simp: \<N>_def \<S>_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3403 | ultimately show ?thesis using that by metis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3404 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3405 |       have "affine hull F \<inter> rel_interior C = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3406 | by (rule affine_hull_face_of_disjoint_rel_interior [OF \<open>convex C\<close> F \<open>F \<noteq> C\<close>]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3407 | with hull_mono [OF \<open>K \<subseteq> F\<close>] | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3408 |       show "affine hull K \<inter> rel_interior C = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3409 | by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3410 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3411 | let ?\<T> = "(\<Union>C \<in> \<N>. \<Union>K \<in> \<U> \<inter> Pow (rel_frontier C). | 
| 67613 | 3412 |                      {convex hull (insert (SOME z. z \<in> rel_interior C) K)})"
 | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3413 | have "\<exists>\<T>. simplicial_complex \<T> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3414 | (\<forall>K \<in> \<T>. aff_dim K \<le> of_nat n) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3415 | (\<forall>C \<in> \<M>. \<exists>F. F \<subseteq> \<T> \<and> C = \<Union>F) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3416 | (\<forall>K \<in> \<T>. \<exists>C. C \<in> \<M> \<and> K \<subseteq> C)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3417 | proof (rule exI, intro conjI ballI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3418 | show "simplicial_complex (\<U> \<union> ?\<T>)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3419 | unfolding simplicial_complex_def | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3420 | proof (intro conjI impI ballI allI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3421 | show "finite (\<U> \<union> ?\<T>)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3422 | using \<open>finite \<U>\<close> \<open>finite \<N>\<close> by simp | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3423 | show "\<exists>n. n simplex S" if "S \<in> \<U> \<union> ?\<T>" for S | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3424 | using that ahK_C_disjoint in_rel_interior simpl\<U> simplex_insert_dimplus1 by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3425 | show "F \<in> \<U> \<union> ?\<T>" if S: "S \<in> \<U> \<union> ?\<T> \<and> F face_of S" for F S | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3426 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3427 | have "F \<in> \<U>" if "S \<in> \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3428 | using S face\<U> that by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3429 | moreover have "F \<in> \<U> \<union> ?\<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3430 | if "F face_of S" "C \<in> \<N>" "K \<in> \<U>" and "K \<subseteq> rel_frontier C" | 
| 67613 | 3431 | and S: "S = convex hull insert (SOME z. z \<in> rel_interior C) K" for C K | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3432 | proof - | 
| 67613 | 3433 | let ?z = "SOME z. z \<in> rel_interior C" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3434 | have "?z \<in> rel_interior C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3435 | by (simp add: in_rel_interior \<open>C \<in> \<N>\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3436 | moreover | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3437 | obtain I where "\<not> affine_dependent I" "card I \<le> n" "aff_dim K < int n" "K = convex hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3438 | using * [OF \<open>K \<in> \<U>\<close>] by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3439 | ultimately have "?z \<notin> affine hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3440 | using ahK_C_disjoint affine_hull_convex_hull that by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3441 | have "compact I" "finite I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3442 | by (auto simp: \<open>\<not> affine_dependent I\<close> aff_independent_finite finite_imp_compact) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3443 | moreover have "F face_of convex hull insert ?z I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3444 | by (metis S \<open>F face_of S\<close> \<open>K = convex hull I\<close> convex_hull_eq_empty convex_hull_insert_segments hull_hull) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3445 | ultimately obtain J where "J \<subseteq> insert ?z I" "F = convex hull J" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3446 | using face_of_convex_hull_subset [of "insert ?z I" F] by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3447 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3448 | proof (cases "?z \<in> J") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3449 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3450 |               have "F \<in> (\<Union>K\<in>\<U> \<inter> Pow (rel_frontier C). {convex hull insert ?z K})"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3451 | proof | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3452 |                 have "convex hull (J - {?z}) face_of K"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3453 | by (metis True \<open>J \<subseteq> insert ?z I\<close> \<open>K = convex hull I\<close> \<open>\<not> affine_dependent I\<close> face_of_convex_hull_affine_independent subset_insert_iff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3454 |                 then have "convex hull (J - {?z}) \<in> \<U>"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3455 | by (rule face\<U> [OF \<open>K \<in> \<U>\<close>]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3456 | moreover | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3457 |                 have "\<And>x. x \<in> convex hull (J - {?z}) \<Longrightarrow> x \<in> rel_frontier C"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3458 | by (metis True \<open>J \<subseteq> insert ?z I\<close> \<open>K = convex hull I\<close> subsetD hull_mono subset_insert_iff that(4)) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3459 |                 ultimately show "convex hull (J - {?z}) \<in> \<U> \<inter> Pow (rel_frontier C)" by auto
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3460 |                 let ?F = "convex hull insert ?z (convex hull (J - {?z}))"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3461 | have "F \<subseteq> ?F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3462 | apply (clarsimp simp: \<open>F = convex hull J\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3463 | by (metis True subsetD hull_mono hull_subset subset_insert_iff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3464 | moreover have "?F \<subseteq> F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3465 | apply (clarsimp simp: \<open>F = convex hull J\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3466 | by (metis (no_types, lifting) True convex_hull_eq_empty convex_hull_insert_segments hull_hull insert_Diff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3467 | ultimately | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3468 |                 show "F \<in> {?F}" by auto
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3469 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3470 | with \<open>C\<in>\<N>\<close> show ?thesis by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3471 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3472 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3473 | then have "F \<in> \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3474 | using face_of_convex_hull_affine_independent [OF \<open>\<not> affine_dependent I\<close>] | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3475 | by (metis Int_absorb2 Int_insert_right_if0 \<open>F = convex hull J\<close> \<open>J \<subseteq> insert ?z I\<close> \<open>K = convex hull I\<close> face\<U> inf_le2 \<open>K \<in> \<U>\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3476 | then show "F \<in> \<U> \<union> ?\<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3477 | by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3478 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3479 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3480 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3481 | using that by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3482 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3483 | have "(S \<inter> S' face_of S) \<and> (S \<inter> S' face_of S')" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3484 | if "S \<in> \<U> \<union> ?\<T>" "S' \<in> \<U> \<union> ?\<T>" for S S' | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3485 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3486 | have symmy: "\<lbrakk>\<And>X Y. R X Y \<Longrightarrow> R Y X; | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3487 | \<And>X Y. \<lbrakk>X \<in> \<U>; Y \<in> \<U>\<rbrakk> \<Longrightarrow> R X Y; | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3488 | \<And>X Y. \<lbrakk>X \<in> \<U>; Y \<in> ?\<T>\<rbrakk> \<Longrightarrow> R X Y; | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3489 | \<And>X Y. \<lbrakk>X \<in> ?\<T>; Y \<in> ?\<T>\<rbrakk> \<Longrightarrow> R X Y\<rbrakk> \<Longrightarrow> R S S'" for R | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3490 | using that by (metis (no_types, lifting) Un_iff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3491 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3492 | proof (rule symmy) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3493 | show "Y \<inter> X face_of Y \<and> Y \<inter> X face_of X" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3494 | if "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" for X Y :: "'a set" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3495 | by (simp add: inf_commute that) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3496 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3497 | show "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3498 | if "X \<in> \<U>" and "Y \<in> \<U>" for X Y | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3499 | by (simp add: faceI\<U> that) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3500 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3501 | show "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3502 | if XY: "X \<in> \<U>" "Y \<in> ?\<T>" for X Y | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3503 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3504 | obtain C K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3505 | where "C \<in> \<N>" "K \<in> \<U>" "K \<subseteq> rel_frontier C" | 
| 67613 | 3506 | and Y: "Y = convex hull insert (SOME z. z \<in> rel_interior C) K" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3507 | using XY by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3508 | have "convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3509 | by (simp add: \<open>C \<in> \<N>\<close> convex\<N>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3510 | have "K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3511 | by (metis DiffE \<open>C \<in> \<N>\<close> \<open>K \<subseteq> rel_frontier C\<close> closed\<N> closure_closed rel_frontier_def subset_iff) | 
| 67613 | 3512 | let ?z = "(SOME z. z \<in> rel_interior C)" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3513 | have z: "?z \<in> rel_interior C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3514 | using \<open>C \<in> \<N>\<close> in_rel_interior by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3515 | obtain D where "D \<in> \<S>" "X \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3516 | using C\<U> \<open>X \<in> \<U>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3517 | have "D \<inter> rel_interior C = (C \<inter> D) \<inter> rel_interior C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3518 | using rel_interior_subset by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3519 |               also have "(C \<inter> D) \<inter> rel_interior C = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3520 | proof (rule face_of_disjoint_rel_interior) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3521 | show "C \<inter> D face_of C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3522 | using \<N>_def \<S>_def \<open>C \<in> \<N>\<close> \<open>D \<in> \<S>\<close> intface\<M> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3523 | show "C \<inter> D \<noteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3524 | by (metis (mono_tags, lifting) Int_lower2 \<N>_def \<S>_def \<open>C \<in> \<N>\<close> \<open>D \<in> \<S>\<close> aff_dim_subset mem_Collect_eq not_le) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3525 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3526 |               finally have DC: "D \<inter> rel_interior C = {}" .
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3527 | have eq: "X \<inter> convex hull (insert ?z K) = X \<inter> convex hull K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3528 | apply (rule Int_convex_hull_insert_rel_exterior [OF \<open>convex C\<close> \<open>K \<subseteq> C\<close> z]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3529 | using DC by (meson \<open>X \<subseteq> D\<close> disjnt_def disjnt_subset1) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3530 | obtain I where I: "\<not> affine_dependent I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3531 | and Keq: "K = convex hull I" and [simp]: "convex hull K = K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3532 | using "*" \<open>K \<in> \<U>\<close> by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3533 | then have "?z \<notin> affine hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3534 | using ahK_C_disjoint \<open>C \<in> \<N>\<close> \<open>K \<in> \<U>\<close> \<open>K \<subseteq> rel_frontier C\<close> affine_hull_convex_hull z by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3535 | have "X \<inter> K face_of K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3536 | by (simp add: \<open>K \<in> \<U>\<close> faceI\<U> \<open>X \<in> \<U>\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3537 | also have "... face_of convex hull insert ?z K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3538 | by (metis I Keq \<open>?z \<notin> affine hull I\<close> aff_independent_finite convex_convex_hull face_of_convex_hull_insert face_of_refl hull_insert) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3539 | finally have "X \<inter> K face_of convex hull insert ?z K" . | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3540 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3541 | using "*" \<open>K \<in> \<U>\<close> faceI\<U> that(1) by (fastforce simp add: Y eq) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3542 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3543 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3544 | show "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3545 | if XY: "X \<in> ?\<T>" "Y \<in> ?\<T>" for X Y | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3546 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3547 | obtain C K D L | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3548 | where "C \<in> \<N>" "K \<in> \<U>" "K \<subseteq> rel_frontier C" | 
| 67613 | 3549 | and X: "X = convex hull insert (SOME z. z \<in> rel_interior C) K" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3550 | and "D \<in> \<N>" "L \<in> \<U>" "L \<subseteq> rel_frontier D" | 
| 67613 | 3551 | and Y: "Y = convex hull insert (SOME z. z \<in> rel_interior D) L" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3552 | using XY by blast | 
| 67613 | 3553 | let ?z = "(SOME z. z \<in> rel_interior C)" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3554 | have z: "?z \<in> rel_interior C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3555 | using \<open>C \<in> \<N>\<close> in_rel_interior by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3556 | have "convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3557 | by (simp add: \<open>C \<in> \<N>\<close> convex\<N>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3558 | have "convex K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3559 | using "*" \<open>K \<in> \<U>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3560 | have "convex L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3561 | by (meson \<open>L \<in> \<U>\<close> convex_simplex simpl\<U>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3562 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3563 | proof (cases "D=C") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3564 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3565 | then have "L \<subseteq> rel_frontier C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3566 | using \<open>L \<subseteq> rel_frontier D\<close> by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3567 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3568 | apply (simp add: X Y True) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3569 | apply (simp add: convex_hull_insert_Int_eq [OF z] \<open>K \<subseteq> rel_frontier C\<close> \<open>L \<subseteq> rel_frontier C\<close> \<open>convex C\<close> \<open>convex K\<close> \<open>convex L\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3570 | using face_of_polytope_insert2 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3571 | by (metis "*" IntI \<open>C \<in> \<N>\<close> \<open>K \<in> \<U>\<close> \<open>L \<in> \<U>\<close>\<open>K \<subseteq> rel_frontier C\<close> \<open>L \<subseteq> rel_frontier C\<close> aff_independent_finite ahK_C_disjoint empty_iff faceI\<U> polytope_convex_hull z) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3572 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3573 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3574 | have "convex D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3575 | by (simp add: \<open>D \<in> \<N>\<close> convex\<N>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3576 | have "K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3577 | by (metis DiffE \<open>C \<in> \<N>\<close> \<open>K \<subseteq> rel_frontier C\<close> closed\<N> closure_closed rel_frontier_def subset_eq) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3578 | have "L \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3579 | by (metis DiffE \<open>D \<in> \<N>\<close> \<open>L \<subseteq> rel_frontier D\<close> closed\<N> closure_closed rel_frontier_def subset_eq) | 
| 67613 | 3580 | let ?w = "(SOME w. w \<in> rel_interior D)" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3581 | have w: "?w \<in> rel_interior D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3582 | using \<open>D \<in> \<N>\<close> in_rel_interior by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3583 | have "C \<inter> rel_interior D = (D \<inter> C) \<inter> rel_interior D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3584 | using rel_interior_subset by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3585 |                 also have "(D \<inter> C) \<inter> rel_interior D = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3586 | proof (rule face_of_disjoint_rel_interior) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3587 | show "D \<inter> C face_of D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3588 | using \<N>_def \<open>C \<in> \<N>\<close> \<open>D \<in> \<N>\<close> intface\<M> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3589 | have "D \<in> \<M> \<and> aff_dim D = int n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3590 | using \<N>_def \<open>D \<in> \<N>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3591 | moreover have "C \<in> \<M> \<and> aff_dim C = int n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3592 | using \<N>_def \<open>C \<in> \<N>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3593 | ultimately show "D \<inter> C \<noteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3594 | by (metis False face_of_aff_dim_lt inf.idem inf_le1 intface\<M> not_le poly\<M> polytope_imp_convex) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3595 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3596 |                 finally have CD: "C \<inter> (rel_interior D) = {}" .
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3597 | have zKC: "(convex hull insert ?z K) \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3598 | by (metis DiffE \<open>C \<in> \<N>\<close> \<open>K \<subseteq> rel_frontier C\<close> closed\<N> closure_closed convex\<N> hull_minimal insert_subset rel_frontier_def rel_interior_subset subset_iff z) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3599 | have eq: "convex hull (insert ?z K) \<inter> convex hull (insert ?w L) = | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3600 | convex hull (insert ?z K) \<inter> convex hull L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3601 | apply (rule Int_convex_hull_insert_rel_exterior [OF \<open>convex D\<close> \<open>L \<subseteq> D\<close> w]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3602 | using zKC CD apply (force simp: disjnt_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3603 | done | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3604 | have ch_id: "convex hull K = K" "convex hull L = L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3605 | using "*" \<open>K \<in> \<U>\<close> \<open>L \<in> \<U>\<close> hull_same by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3606 | have "convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3607 | by (simp add: \<open>C \<in> \<N>\<close> convex\<N>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3608 | have "convex hull (insert ?z K) \<inter> L = L \<inter> convex hull (insert ?z K)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3609 | by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3610 | also have "... = convex hull K \<inter> L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3611 | proof (subst Int_convex_hull_insert_rel_exterior [OF \<open>convex C\<close> \<open>K \<subseteq> C\<close> z]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3612 |                   have "(C \<inter> D) \<inter> rel_interior C = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3613 | proof (rule face_of_disjoint_rel_interior) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3614 | show "C \<inter> D face_of C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3615 | using \<N>_def \<open>C \<in> \<N>\<close> \<open>D \<in> \<N>\<close> intface\<M> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3616 | have "D \<in> \<M>" "aff_dim D = int n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3617 | using \<N>_def \<open>D \<in> \<N>\<close> by fastforce+ | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3618 | moreover have "C \<in> \<M>" "aff_dim C = int n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3619 | using \<N>_def \<open>C \<in> \<N>\<close> by fastforce+ | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3620 | ultimately have "aff_dim D + - 1 * aff_dim C \<le> 0" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3621 | by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3622 | then have "\<not> C face_of D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3623 | using False \<open>convex D\<close> face_of_aff_dim_lt by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3624 | show "C \<inter> D \<noteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3625 | using \<open>C \<in> \<M>\<close> \<open>D \<in> \<M>\<close> \<open>\<not> C face_of D\<close> intface\<M> by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3626 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3627 |                   then have "D \<inter> rel_interior C = {}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3628 | by (metis inf.absorb_iff2 inf_assoc inf_sup_aci(1) rel_interior_subset) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3629 | then show "disjnt L (rel_interior C)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3630 | by (meson \<open>L \<subseteq> D\<close> disjnt_def disjnt_subset1) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3631 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3632 | show "L \<inter> convex hull K = convex hull K \<inter> L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3633 | by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3634 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3635 | finally have chKL: "convex hull (insert ?z K) \<inter> L = convex hull K \<inter> L" . | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3636 | have "convex hull insert ?z K \<inter> convex hull L face_of K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3637 | by (simp add: \<open>K \<in> \<U>\<close> \<open>L \<in> \<U>\<close> ch_id chKL faceI\<U>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3638 | also have "... face_of convex hull insert ?z K" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3639 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3640 | obtain I where I: "\<not> affine_dependent I" "K = convex hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3641 | using * [OF \<open>K \<in> \<U>\<close>] by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3642 | then have "\<And>a. a \<notin> rel_interior C \<or> a \<notin> affine hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3643 | using ahK_C_disjoint \<open>C \<in> \<N>\<close> \<open>K \<in> \<U>\<close> \<open>K \<subseteq> rel_frontier C\<close> affine_hull_convex_hull by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3644 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3645 | by (metis I affine_independent_insert face_of_convex_hull_affine_independent hull_insert subset_insertI z) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3646 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3647 | finally have 1: "convex hull insert ?z K \<inter> convex hull L face_of convex hull insert ?z K" . | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3648 | have "convex hull insert ?z K \<inter> convex hull L face_of L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3649 | by (simp add: \<open>K \<in> \<U>\<close> \<open>L \<in> \<U>\<close> ch_id chKL faceI\<U>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3650 | also have "... face_of convex hull insert ?w L" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3651 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3652 | obtain I where I: "\<not> affine_dependent I" "L = convex hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3653 | using * [OF \<open>L \<in> \<U>\<close>] by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3654 | then have "\<And>a. a \<notin> rel_interior D \<or> a \<notin> affine hull I" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3655 | using \<open>D \<in> \<N>\<close> \<open>L \<in> \<U>\<close> \<open>L \<subseteq> rel_frontier D\<close> affine_hull_convex_hull ahK_C_disjoint by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3656 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3657 | by (metis I aff_independent_finite convex_convex_hull face_of_convex_hull_insert face_of_refl hull_insert w) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3658 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3659 | finally have 2: "convex hull insert ?z K \<inter> convex hull L face_of convex hull insert ?w L" . | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3660 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3661 | by (simp add: X Y eq 1 2) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3662 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3663 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3664 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3665 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3666 | then | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3667 | show "S \<inter> S' face_of S" "S \<inter> S' face_of S'" if "S \<in> \<U> \<union> ?\<T> \<and> S' \<in> \<U> \<union> ?\<T>" for S S' | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3668 | using that by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3669 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3670 | show "\<exists>F \<subseteq> \<U> \<union> ?\<T>. C = \<Union>F" if "C \<in> \<M>" for C | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3671 | proof (cases "C \<in> \<S>") | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3672 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3673 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3674 | by (meson UnCI fin\<U> subsetD subsetI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3675 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3676 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3677 | then have "C \<in> \<N>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3678 | by (simp add: \<N>_def \<S>_def aff\<M> less_le that) | 
| 67613 | 3679 | let ?z = "SOME z. z \<in> rel_interior C" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3680 | have z: "?z \<in> rel_interior C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3681 | using \<open>C \<in> \<N>\<close> in_rel_interior by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3682 |         let ?F = "\<Union>K \<in> \<U> \<inter> Pow (rel_frontier C). {convex hull (insert ?z K)}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3683 | have "?F \<subseteq> ?\<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3684 | using \<open>C \<in> \<N>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3685 | moreover have "C \<subseteq> \<Union>?F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3686 | proof | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3687 | fix x | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3688 | assume "x \<in> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3689 | have "convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3690 | using \<open>C \<in> \<N>\<close> convex\<N> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3691 | have "bounded C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3692 | using \<open>C \<in> \<N>\<close> by (simp add: poly\<M> polytope_imp_bounded that) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3693 | have "polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3694 | using \<open>C \<in> \<N>\<close> poly\<N> by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3695 |           have "\<not> (?z = x \<and> C = {?z})"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3696 | using \<open>C \<in> \<N>\<close> aff_dim_sing [of ?z] \<open>\<not> n \<le> 1\<close> by (force simp: \<N>_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3697 | then obtain y where y: "y \<in> rel_frontier C" and xzy: "x \<in> closed_segment ?z y" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3698 | and sub: "open_segment ?z y \<subseteq> rel_interior C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3699 | by (blast intro: segment_to_rel_frontier [OF \<open>convex C\<close> \<open>bounded C\<close> z \<open>x \<in> C\<close>]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3700 | then obtain F where "y \<in> F" "F face_of C" "F \<noteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3701 | by (auto simp: rel_frontier_of_polyhedron_alt [OF polytope_imp_polyhedron [OF \<open>polytope C\<close>]]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3702 | then obtain \<G> where "finite \<G>" "\<G> \<subseteq> \<U>" "F = \<Union>\<G>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3703 | by (metis (mono_tags, lifting) \<S>_def \<open>C \<in> \<M>\<close> \<open>convex C\<close> aff\<M> face\<M> face_of_aff_dim_lt fin\<U> le_less_trans mem_Collect_eq not_less) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3704 | then obtain K where "y \<in> K" "K \<in> \<G>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3705 | using \<open>y \<in> F\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3706 |           moreover have x: "x \<in> convex hull {?z,y}"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3707 | using segment_convex_hull xzy by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3708 |           moreover have "convex hull {?z,y} \<subseteq> convex hull insert ?z K"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3709 | by (metis (full_types) \<open>y \<in> K\<close> hull_mono empty_subsetI insertCI insert_subset) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3710 | moreover have "K \<in> \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3711 | using \<open>K \<in> \<G>\<close> \<open>\<G> \<subseteq> \<U>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3712 | moreover have "K \<subseteq> rel_frontier C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3713 | using \<open>F = \<Union>\<G>\<close> \<open>F \<noteq> C\<close> \<open>F face_of C\<close> \<open>K \<in> \<G>\<close> face_of_subset_rel_frontier by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3714 | ultimately show "x \<in> \<Union>?F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3715 | by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3716 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3717 | moreover | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3718 | have "convex hull insert (SOME z. z \<in> rel_interior C) K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3719 | if "K \<in> \<U>" "K \<subseteq> rel_frontier C" for K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3720 | proof (rule hull_minimal) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3721 | show "insert (SOME z. z \<in> rel_interior C) K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3722 | using that \<open>C \<in> \<N>\<close> in_rel_interior rel_interior_subset | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3723 | by (force simp: closure_eq rel_frontier_def closed\<N>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3724 | show "convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3725 | by (simp add: \<open>C \<in> \<N>\<close> convex\<N>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3726 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3727 | then have "\<Union>?F \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3728 | by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3729 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3730 | by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3731 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3732 | |
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3733 | have "(\<exists>C. C \<in> \<M> \<and> L \<subseteq> C) \<and> aff_dim L \<le> int n" if "L \<in> \<U> \<union> ?\<T>" for L | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3734 | using that | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3735 | proof | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3736 | assume "L \<in> \<U>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3737 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3738 | using C\<U> \<S>_def "*" by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3739 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3740 | assume "L \<in> ?\<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3741 | then obtain C K where "C \<in> \<N>" | 
| 67613 | 3742 | and L: "L = convex hull insert (SOME z. z \<in> rel_interior C) K" | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3743 | and K: "K \<in> \<U>" "K \<subseteq> rel_frontier C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3744 | by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3745 | then have "convex hull C = C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3746 | by (meson convex\<N> convex_hull_eq) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3747 | then have "convex C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3748 | by (metis (no_types) convex_convex_hull) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3749 | have "rel_frontier C \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3750 | by (metis DiffE closed\<N> \<open>C \<in> \<N>\<close> closure_closed rel_frontier_def subsetI) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3751 | have "K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3752 | using K \<open>rel_frontier C \<subseteq> C\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3753 | have "C \<in> \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3754 | using \<N>_def \<open>C \<in> \<N>\<close> by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3755 | moreover have "L \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3756 | using K L \<open>C \<in> \<N>\<close> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3757 | by (metis \<open>K \<subseteq> C\<close> \<open>convex hull C = C\<close> contra_subsetD hull_mono in_rel_interior insert_subset rel_interior_subset) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3758 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3759 | using \<open>rel_frontier C \<subseteq> C\<close> \<open>L \<subseteq> C\<close> aff\<M> aff_dim_subset \<open>C \<in> \<M>\<close> dual_order.trans by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3760 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3761 | then show "\<exists>C. C \<in> \<M> \<and> L \<subseteq> C" "aff_dim L \<le> int n" if "L \<in> \<U> \<union> ?\<T>" for L | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3762 | using that by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3763 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3764 | then show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3765 | apply (rule ex_forward, safe) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3766 | apply (meson Union_iff subsetCE, fastforce) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3767 | by (meson infinite_super simplicial_complex_def) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3768 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3769 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3770 | |
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3771 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3772 | lemma simplicial_subdivision_of_cell_complex_lowdim: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3773 | assumes "finite \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3774 | and poly: "\<And>C. C \<in> \<M> \<Longrightarrow> polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3775 | and face: "\<And>C1 C2. \<lbrakk>C1 \<in> \<M>; C2 \<in> \<M>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3776 | and aff: "\<And>C. C \<in> \<M> \<Longrightarrow> aff_dim C \<le> d" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3777 | obtains \<T> where "simplicial_complex \<T>" "\<And>K. K \<in> \<T> \<Longrightarrow> aff_dim K \<le> d" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3778 | "\<Union>\<T> = \<Union>\<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3779 | "\<And>C. C \<in> \<M> \<Longrightarrow> \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3780 | "\<And>K. K \<in> \<T> \<Longrightarrow> \<exists>C. C \<in> \<M> \<and> K \<subseteq> C" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3781 | proof (cases "d \<ge> 0") | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3782 | case True | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3783 | then obtain n where n: "d = of_nat n" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3784 | using zero_le_imp_eq_int by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3785 | have "\<exists>\<T>. simplicial_complex \<T> \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3786 | (\<forall>K\<in>\<T>. aff_dim K \<le> int n) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3787 |             \<Union>\<T> = \<Union>(\<Union>C\<in>\<M>. {F. F face_of C}) \<and>
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3788 |             (\<forall>C\<in>\<Union>C\<in>\<M>. {F. F face_of C}.
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3789 | \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F) \<and> | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3790 |             (\<forall>K\<in>\<T>. \<exists>C. C \<in> (\<Union>C\<in>\<M>. {F. F face_of C}) \<and> K \<subseteq> C)"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3791 | proof (rule simplicial_subdivision_aux) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3792 |     show "finite (\<Union>C\<in>\<M>. {F. F face_of C})"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3793 | using \<open>finite \<M>\<close> poly polyhedron_eq_finite_faces polytope_imp_polyhedron by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3794 |     show "polytope F" if "F \<in> (\<Union>C\<in>\<M>. {F. F face_of C})" for F
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3795 | using poly that face_of_polytope_polytope by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3796 |     show "aff_dim F \<le> int n" if "F \<in> (\<Union>C\<in>\<M>. {F. F face_of C})" for F
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3797 | using that | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3798 | by clarify (metis n aff_dim_subset aff face_of_imp_subset order_trans) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3799 |     show "F \<in> (\<Union>C\<in>\<M>. {F. F face_of C})"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3800 |       if "G \<in> (\<Union>C\<in>\<M>. {F. F face_of C})" and "F face_of G" for F G
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3801 | using that face_of_trans by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3802 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3803 | show "F1 \<inter> F2 face_of F1 \<and> F1 \<inter> F2 face_of F2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3804 |       if "F1 \<in> (\<Union>C\<in>\<M>. {F. F face_of C})" and "F2 \<in> (\<Union>C\<in>\<M>. {F. F face_of C})" for F1 F2
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3805 | using that | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3806 | by safe (meson face face_of_Int_subface)+ | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3807 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3808 | moreover | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3809 |   have "\<Union>(\<Union>C\<in>\<M>. {F. F face_of C}) = \<Union>\<M>"
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3810 | using face_of_imp_subset face by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3811 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3812 | apply clarify | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3813 | apply (rule that, assumption+) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3814 | using n apply blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3815 | apply (simp_all add: poly face_of_refl polytope_imp_convex) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3816 | using face_of_imp_subset by fastforce | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3817 | next | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3818 | case False | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3819 | then have m1: "\<And>C. C \<in> \<M> \<Longrightarrow> aff_dim C = -1" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3820 | by (metis aff aff_dim_empty_eq aff_dim_negative_iff dual_order.trans not_less) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3821 | then have face\<M>: "\<And>F S. \<lbrakk>S \<in> \<M>; F face_of S\<rbrakk> \<Longrightarrow> F \<in> \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3822 | by (metis aff_dim_empty face_of_empty) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3823 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3824 | proof | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3825 | have "\<And>S. S \<in> \<M> \<Longrightarrow> \<exists>n. n simplex S" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3826 | by (metis (no_types) m1 aff_dim_empty simplex_minus_1) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3827 | then show "simplicial_complex \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3828 | by (auto simp: simplicial_complex_def \<open>finite \<M>\<close> face intro: face\<M>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3829 | show "aff_dim K \<le> d" if "K \<in> \<M>" for K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3830 | by (simp add: that aff) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3831 | show "\<exists>F. finite F \<and> F \<subseteq> \<M> \<and> C = \<Union>F" if "C \<in> \<M>" for C | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3832 | using \<open>C \<in> \<M>\<close> equals0I by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3833 | show "\<exists>C. C \<in> \<M> \<and> K \<subseteq> C" if "K \<in> \<M>" for K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3834 | using \<open>K \<in> \<M>\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3835 | qed auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3836 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3837 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3838 | proposition simplicial_subdivision_of_cell_complex: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3839 | assumes "finite \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3840 | and poly: "\<And>C. C \<in> \<M> \<Longrightarrow> polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3841 | and face: "\<And>C1 C2. \<lbrakk>C1 \<in> \<M>; C2 \<in> \<M>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3842 | obtains \<T> where "simplicial_complex \<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3843 | "\<Union>\<T> = \<Union>\<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3844 | "\<And>C. C \<in> \<M> \<Longrightarrow> \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3845 | "\<And>K. K \<in> \<T> \<Longrightarrow> \<exists>C. C \<in> \<M> \<and> K \<subseteq> C" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3846 | by (blast intro: simplicial_subdivision_of_cell_complex_lowdim [OF assms aff_dim_le_DIM]) | 
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3847 | |
| 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3848 | corollary fine_simplicial_subdivision_of_cell_complex: | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3849 | assumes "0 < e" "finite \<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3850 | and poly: "\<And>C. C \<in> \<M> \<Longrightarrow> polytope C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3851 | and face: "\<And>C1 C2. \<lbrakk>C1 \<in> \<M>; C2 \<in> \<M>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3852 | obtains \<T> where "simplicial_complex \<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3853 | "\<And>K. K \<in> \<T> \<Longrightarrow> diameter K < e" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3854 | "\<Union>\<T> = \<Union>\<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3855 | "\<And>C. C \<in> \<M> \<Longrightarrow> \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3856 | "\<And>K. K \<in> \<T> \<Longrightarrow> \<exists>C. C \<in> \<M> \<and> K \<subseteq> C" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3857 | proof - | 
| 66297 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3858 | obtain \<N> where \<N>: "finite \<N>" "\<Union>\<N> = \<Union>\<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3859 | and diapoly: "\<And>X. X \<in> \<N> \<Longrightarrow> diameter X < e" "\<And>X. X \<in> \<N> \<Longrightarrow> polytope X" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3860 | and "\<And>X Y. \<lbrakk>X \<in> \<N>; Y \<in> \<N>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3861 | and \<N>covers: "\<And>C x. C \<in> \<M> \<and> x \<in> C \<Longrightarrow> \<exists>D. D \<in> \<N> \<and> x \<in> D \<and> D \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3862 | and \<N>covered: "\<And>C. C \<in> \<N> \<Longrightarrow> \<exists>D. D \<in> \<M> \<and> C \<subseteq> D" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3863 | by (blast intro: cell_complex_subdivision_exists [OF \<open>0 < e\<close> \<open>finite \<M>\<close> poly aff_dim_le_DIM face]) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3864 | then obtain \<T> where \<T>: "simplicial_complex \<T>" "\<Union>\<T> = \<Union>\<N>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3865 | and \<T>covers: "\<And>C. C \<in> \<N> \<Longrightarrow> \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3866 | and \<T>covered: "\<And>K. K \<in> \<T> \<Longrightarrow> \<exists>C. C \<in> \<N> \<and> K \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3867 | using simplicial_subdivision_of_cell_complex [OF \<open>finite \<N>\<close>] by metis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3868 | show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3869 | proof | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3870 | show "simplicial_complex \<T>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3871 | by (rule \<T>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3872 | show "diameter K < e" if "K \<in> \<T>" for K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3873 | by (metis le_less_trans diapoly \<T>covered diameter_subset polytope_imp_bounded that) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3874 | show "\<Union>\<T> = \<Union>\<M>" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3875 | by (simp add: \<N>(2) \<open>\<Union>\<T> = \<Union>\<N>\<close>) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3876 | show "\<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F" if "C \<in> \<M>" for C | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3877 | proof - | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3878 |       { fix x
 | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3879 | assume "x \<in> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3880 | then obtain D where "D \<in> \<T>" "x \<in> D" "D \<subseteq> C" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3881 | using \<N>covers \<open>C \<in> \<M>\<close> \<T>covers by force | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3882 | then have "\<exists>X\<in>\<T> \<inter> Pow C. x \<in> X" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3883 | using \<open>D \<in> \<T>\<close> \<open>D \<subseteq> C\<close> \<open>x \<in> D\<close> by blast | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3884 | } | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3885 | moreover | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3886 | have "finite (\<T> \<inter> Pow C)" | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3887 | using \<open>simplicial_complex \<T>\<close> simplicial_complex_def by auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3888 | ultimately show ?thesis | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3889 | by (rule_tac x="(\<T> \<inter> Pow C)" in exI) auto | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3890 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3891 | show "\<exists>C. C \<in> \<M> \<and> K \<subseteq> C" if "K \<in> \<T>" for K | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3892 | by (meson \<N>covered \<T>covered order_trans that) | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3893 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3894 | qed | 
| 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 paulson <lp15@cam.ac.uk> parents: 
66287diff
changeset | 3895 | |
| 69683 | 3896 | subsection\<open>Some results on cell division with full-dimensional cells only\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68074diff
changeset | 3897 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3898 | lemma convex_Union_fulldim_cells: | 
| 66641 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3899 | assumes "finite \<S>" and clo: "\<And>C. C \<in> \<S> \<Longrightarrow> closed C" and con: "\<And>C. C \<in> \<S> \<Longrightarrow> convex C" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3900 | and eq: "\<Union>\<S> = U"and "convex U" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3901 |  shows "\<Union>{C \<in> \<S>. aff_dim C = aff_dim U} = U"  (is "?lhs = U")
 | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3902 | proof - | 
| 66641 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3903 | have "closed U" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3904 | using \<open>finite \<S>\<close> clo eq by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3905 | have "?lhs \<subseteq> U" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3906 | using eq by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3907 | moreover have "U \<subseteq> ?lhs" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3908 | proof (cases "\<forall>C \<in> \<S>. aff_dim C = aff_dim U") | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3909 | case True | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3910 | then show ?thesis | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3911 | using eq by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3912 | next | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3913 | case False | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3914 | have "closed ?lhs" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3915 | by (simp add: \<open>finite \<S>\<close> clo closed_Union) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3916 | moreover have "U \<subseteq> closure ?lhs" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3917 | proof - | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3918 |       have "U \<subseteq> closure(\<Inter>{U - C |C. C \<in> \<S> \<and> aff_dim C < aff_dim U})"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3919 | proof (rule Baire [OF \<open>closed U\<close>]) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3920 |         show "countable {U - C |C. C \<in> \<S> \<and> aff_dim C < aff_dim U}"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3921 | using \<open>finite \<S>\<close> uncountable_infinite by fastforce | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3922 | have "\<And>C. C \<in> \<S> \<Longrightarrow> openin (top_of_set U) (U-C)" | 
| 66641 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3923 | by (metis Sup_upper clo closed_limpt closedin_limpt eq openin_diff openin_subtopology_self) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3924 | then show "openin (top_of_set U) T \<and> U \<subseteq> closure T" | 
| 66641 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3925 |           if "T \<in> {U - C |C. C \<in> \<S> \<and> aff_dim C < aff_dim U}" for T
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3926 | using that dense_complement_convex_closed \<open>closed U\<close> \<open>convex U\<close> by auto | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3927 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3928 | also have "... \<subseteq> closure ?lhs" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3929 | proof - | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3930 | obtain C where "C \<in> \<S>" "aff_dim C < aff_dim U" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3931 | by (metis False Sup_upper aff_dim_subset eq eq_iff not_le) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3932 | have "\<exists>X. X \<in> \<S> \<and> aff_dim X = aff_dim U \<and> x \<in> X" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3933 | if "\<And>V. (\<exists>C. V = U - C \<and> C \<in> \<S> \<and> aff_dim C < aff_dim U) \<Longrightarrow> x \<in> V" for x | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3934 | proof - | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3935 | have "x \<in> U \<and> x \<in> \<Union>\<S>" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3936 | using \<open>C \<in> \<S>\<close> \<open>aff_dim C < aff_dim U\<close> eq that by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3937 | then show ?thesis | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3938 | by (metis Diff_iff Sup_upper Union_iff aff_dim_subset dual_order.order_iff_strict eq that) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3939 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3940 | then show ?thesis | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3941 | by (auto intro!: closure_mono) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3942 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3943 | finally show ?thesis . | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3944 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3945 | ultimately show ?thesis | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3946 | using closure_subset_eq by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3947 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3948 | ultimately show ?thesis by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3949 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3950 | |
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3951 | proposition fine_triangular_subdivision_of_cell_complex: | 
| 66641 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3952 | assumes "0 < e" "finite \<M>" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3953 | and poly: "\<And>C. C \<in> \<M> \<Longrightarrow> polytope C" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3954 | and aff: "\<And>C. C \<in> \<M> \<Longrightarrow> aff_dim C = d" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3955 | and face: "\<And>C1 C2. \<lbrakk>C1 \<in> \<M>; C2 \<in> \<M>\<rbrakk> \<Longrightarrow> C1 \<inter> C2 face_of C1 \<and> C1 \<inter> C2 face_of C2" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3956 | obtains \<T> where "triangulation \<T>" "\<And>k. k \<in> \<T> \<Longrightarrow> diameter k < e" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3957 | "\<And>k. k \<in> \<T> \<Longrightarrow> aff_dim k = d" "\<Union>\<T> = \<Union>\<M>" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3958 | "\<And>C. C \<in> \<M> \<Longrightarrow> \<exists>f. finite f \<and> f \<subseteq> \<T> \<and> C = \<Union>f" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3959 | "\<And>k. k \<in> \<T> \<Longrightarrow> \<exists>C. C \<in> \<M> \<and> k \<subseteq> C" | 
| 69730 
0c3dcb3a17f6
tagged 5 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69683diff
changeset | 3960 | proof - | 
| 66641 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3961 | obtain \<T> where "simplicial_complex \<T>" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3962 | and dia\<T>: "\<And>K. K \<in> \<T> \<Longrightarrow> diameter K < e" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3963 | and "\<Union>\<T> = \<Union>\<M>" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3964 | and in\<M>: "\<And>C. C \<in> \<M> \<Longrightarrow> \<exists>F. finite F \<and> F \<subseteq> \<T> \<and> C = \<Union>F" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3965 | and in\<T>: "\<And>K. K \<in> \<T> \<Longrightarrow> \<exists>C. C \<in> \<M> \<and> K \<subseteq> C" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3966 | by (blast intro: fine_simplicial_subdivision_of_cell_complex [OF \<open>e > 0\<close> \<open>finite \<M>\<close> poly face]) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3967 |   let ?\<T> = "{K \<in> \<T>. aff_dim K = d}"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3968 | show thesis | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3969 | proof | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3970 | show "triangulation ?\<T>" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3971 | using \<open>simplicial_complex \<T>\<close> by (auto simp: triangulation_def simplicial_complex_def) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3972 |     show "diameter L < e" if "L \<in> {K \<in> \<T>. aff_dim K = d}" for L
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3973 | using that by (auto simp: dia\<T>) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3974 |     show "aff_dim L = d" if "L \<in> {K \<in> \<T>. aff_dim K = d}" for L
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3975 | using that by auto | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3976 |     show "\<exists>F. finite F \<and> F \<subseteq> {K \<in> \<T>. aff_dim K = d} \<and> C = \<Union>F" if "C \<in> \<M>" for C
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3977 | proof - | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3978 | obtain F where "finite F" "F \<subseteq> \<T>" "C = \<Union>F" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3979 | using in\<M> [OF \<open>C \<in> \<M>\<close>] by auto | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3980 | show ?thesis | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3981 | proof (intro exI conjI) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3982 |         show "finite {K \<in> F. aff_dim K = d}"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3983 | by (simp add: \<open>finite F\<close>) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3984 |         show "{K \<in> F. aff_dim K = d} \<subseteq> {K \<in> \<T>. aff_dim K = d}"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3985 | using \<open>F \<subseteq> \<T>\<close> by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3986 | have "d = aff_dim C" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3987 | by (simp add: aff that) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3988 | moreover have "\<And>K. K \<in> F \<Longrightarrow> closed K \<and> convex K" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3989 | using \<open>simplicial_complex \<T>\<close> \<open>F \<subseteq> \<T>\<close> | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3990 | unfolding simplicial_complex_def by (metis subsetCE \<open>F \<subseteq> \<T>\<close> closed_simplex convex_simplex) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3991 | moreover have "convex (\<Union>F)" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3992 | using \<open>C = \<Union>F\<close> poly polytope_imp_convex that by blast | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3993 |         ultimately show "C = \<Union>{K \<in> F. aff_dim K = d}"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3994 | by (simp add: convex_Union_fulldim_cells \<open>C = \<Union>F\<close> \<open>finite F\<close>) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3995 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3996 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3997 |     then show "\<Union>{K \<in> \<T>. aff_dim K = d} = \<Union>\<M>"
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3998 | by auto (meson in\<T> subsetCE) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 3999 | show "\<exists>C. C \<in> \<M> \<and> L \<subseteq> C" | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 4000 |       if "L \<in> {K \<in> \<T>. aff_dim K = d}" for L
 | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 4001 | using that by (auto simp: in\<T>) | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 4002 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 4003 | qed | 
| 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 paulson <lp15@cam.ac.uk> parents: 
66515diff
changeset | 4004 | |
| 63078 
e49dc94eb624
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 4005 | end |