src/HOL/Multivariate_Analysis/Polytope.thy
author paulson <lp15@cam.ac.uk>
Tue, 10 May 2016 14:04:44 +0100
changeset 63078 e49dc94eb624
child 63145 703edebd1d92
permissions -rw-r--r--
Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman Minkowski theorem
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
63078
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     1
section \<open>Faces, Extreme Points, Polytopes, Polyhedra etc.\<close>
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
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     6
imports Cartesian_Euclidean_Space
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
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     9
subsection \<open>Faces of a (usually convex) set\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    10
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    11
definition face_of :: "['a::real_vector set, 'a set] \<Rightarrow> bool" (infixr "(face'_of)" 50)
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
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff 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"
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
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    20
lemma face_of_translation_eq [simp]:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    21
    "(op + a ` T face_of op + a ` S) \<longleftrightarrow> T face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    22
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    23
  have *: "\<And>a T S. T face_of S \<Longrightarrow> (op + a ` T face_of op + a ` S)"
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)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    25
    apply (drule open_segment_translation_eq [THEN iffD1])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    26
    using inj_image_mem_iff inj_add_left apply metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    27
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    28
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    29
    apply (rule iffI)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    30
    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
    31
    apply (blast intro: *)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    32
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    33
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    34
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    35
lemma face_of_linear_image:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    36
  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
    37
    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
    38
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
    39
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    40
lemma face_of_refl: "convex S \<Longrightarrow> S face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    41
  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
    42
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    43
lemma face_of_refl_eq: "S face_of S \<longleftrightarrow> convex S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    44
  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
    45
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    46
lemma empty_face_of [iff]: "{} face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    47
  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
    48
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    49
lemma face_of_empty [simp]: "S face_of {} \<longleftrightarrow> S = {}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    50
  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
    51
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    52
lemma face_of_trans [trans]: "\<lbrakk>S face_of T; T face_of u\<rbrakk> \<Longrightarrow> S face_of u"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    53
  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
    54
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    55
lemma face_of_face: "T face_of S \<Longrightarrow> (f face_of T \<longleftrightarrow> f face_of S \<and> f \<subseteq> T)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    56
  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
    57
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    58
lemma face_of_subset: "\<lbrakk>F face_of S; F \<subseteq> T; T \<subseteq> S\<rbrakk> \<Longrightarrow> F face_of T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    59
  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
    60
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    61
lemma face_of_slice: "\<lbrakk>F face_of S; convex T\<rbrakk> \<Longrightarrow> (F \<inter> T) face_of (S \<inter> T)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    62
  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
    63
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    64
lemma face_of_Int: "\<lbrakk>t1 face_of S; t2 face_of S\<rbrakk> \<Longrightarrow> (t1 \<inter> t2) face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    65
  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
    66
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    67
lemma face_of_Inter: "\<lbrakk>A \<noteq> {}; \<And>T. T \<in> A \<Longrightarrow> T face_of S\<rbrakk> \<Longrightarrow> (\<Inter> A) face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    68
  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
    69
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    70
lemma face_of_Int_Int: "\<lbrakk>F face_of T; F' face_of t'\<rbrakk> \<Longrightarrow> (F \<inter> F') face_of (T \<inter> t')"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    71
  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
    72
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    73
lemma face_of_imp_subset: "T face_of S \<Longrightarrow> T \<subseteq> S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    74
  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
    75
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    76
lemma face_of_imp_eq_affine_Int:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    77
     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
    78
     assumes S: "convex S" "closed S" and T: "T face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    79
     shows "T = (affine hull T) \<inter> S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    80
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    81
  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
    82
  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
    83
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    84
    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
    85
      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
    86
    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
    87
      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
    88
    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
    89
      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
    90
      apply clarify
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    91
      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
    92
      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
    93
      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
    94
      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
    95
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    96
    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
    97
      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
    98
    show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    99
      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
   100
      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
   101
      apply (rule IntI)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   102
        using `y \<noteq> x` \<open>e > 0\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   103
        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
   104
        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
   105
      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
   106
      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
   107
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   108
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   109
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   110
    apply (rule subset_antisym)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   111
    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
   112
    apply (cases "T={}", simp)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   113
    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
   114
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   115
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   116
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   117
lemma face_of_imp_closed:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   118
     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
   119
     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
   120
  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
   121
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   122
lemma 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
   123
    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
   124
      shows "(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
   125
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   126
  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
   127
          for u v x
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   128
  proof (rule antisym)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   129
    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
   130
      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
   131
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   132
    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
   133
      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
   134
      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
   135
    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
   136
      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
   137
    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
   138
      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
   139
    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
   140
      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
   141
    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
   142
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   143
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   144
    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
   145
    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
   146
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   147
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   148
lemma 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
   149
   "\<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
   150
    \<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
   151
  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
   152
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   153
lemma 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
   154
    "\<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
   155
  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
   156
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   157
lemma face_of_Int_supporting_hyperplane_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   158
    "\<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
   159
  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
   160
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   161
lemma face_of_imp_convex: "T face_of S \<Longrightarrow> convex T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   162
  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
   163
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   164
lemma face_of_imp_compact:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   165
    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
   166
    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
   167
  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
   168
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   169
lemma face_of_Int_subface:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   170
     "c1 \<inter> c2 face_of c1 \<and> c1 \<inter> c2 face_of c2 \<and> d1 face_of c1 \<and> d2 face_of c2
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   171
      \<Longrightarrow> (d1 \<inter> d2) face_of d1 \<and> (d1 \<inter> d2) face_of d2"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   172
  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
   173
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   174
lemma subset_of_face_of:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   175
    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
   176
    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
   177
      shows "u \<subseteq> T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   178
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   179
  fix c
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   180
  assume "c \<in> u"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   181
  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
   182
  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
   183
    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
   184
  show "c \<in> T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   185
  proof (cases "b=c")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   186
    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
   187
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   188
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   189
    def d \<equiv> "b + (e / norm(b - c)) *\<^sub>R (b - c)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   190
    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
   191
      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
   192
      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
   193
    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
   194
    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
   195
      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
   196
    then have [simp]: "d \<noteq> c" using False scaleR_cancel_left [of "1 + (e / norm (b - c))" b c]
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   197
      by (simp add: algebra_simps d_def) (simp add: divide_simps)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   198
    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
   199
      using False nbc
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   200
      apply (simp add: algebra_simps divide_simps)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   201
      by (metis mult_eq_0_iff norm_eq_zero norm_imp_pos_and_ge norm_pths(2) real_scaleR_def scaleR_left.add zero_less_norm_iff)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   202
    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
   203
      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
   204
      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
   205
      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
   206
      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
   207
      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
   208
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   209
    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
   210
      apply (rule face_ofD [OF \<open>T face_of S\<close>])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   211
      using `d \<in> u`  `c \<in> u` \<open>u \<subseteq> S\<close>  \<open>b \<in> T\<close>  apply auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   212
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   213
    then show ?thesis ..
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   214
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   215
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   216
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   217
lemma face_of_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   218
    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
   219
    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
   220
      shows "T = u"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   221
  apply (rule subset_antisym)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   222
  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
   223
  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
   224
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   225
lemma 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
   226
      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
   227
      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
   228
        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
   229
  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
   230
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   231
lemma face_of_disjoint_interior:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   232
      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
   233
      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
   234
        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
   235
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   236
  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
   237
    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
   238
  thus ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   239
    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
   240
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   241
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   242
lemma face_of_subset_rel_boundary:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   243
  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
   244
  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
   245
    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
   246
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
   247
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   248
lemma face_of_subset_rel_frontier:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   249
    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
   250
    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
   251
      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
   252
  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
   253
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   254
lemma face_of_aff_dim_lt:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   255
  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
   256
  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
   257
    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
   258
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   259
  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
   260
    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
   261
  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
   262
  proof (cases "T = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   263
    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
   264
      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
   265
  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
   266
    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
   267
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   268
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   269
    by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   270
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   271
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   272
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   273
lemma affine_diff_divide:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   274
    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
   275
      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
   276
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   277
  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
   278
    using assms
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   279
    by (simp add: algebra_simps) (simp add: scaleR_left_distrib [symmetric] divide_simps)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   280
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   281
    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
   282
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   283
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   284
lemma face_of_convex_hulls:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   285
      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
   286
      shows  "(convex hull 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
   287
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   288
  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
   289
    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
   290
  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
   291
          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
   292
          for x y w
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   293
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   294
    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
   295
      using convex_hull_subset_affine_hull w by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   296
    obtain a b where a: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> a i" and asum: "setsum a S = 1" and aeqx: "(\<Sum>i\<in>S. a i *\<^sub>R i) = x"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   297
                 and b: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> b i" and bsum: "setsum b S = 1" and beqy: "(\<Sum>i\<in>S. b i *\<^sub>R i) = y"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   298
      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
   299
    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
   300
               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
   301
      using w 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
   302
    def c \<equiv> "\<lambda>i. (1 - u) * a i + u * b i"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   303
    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
   304
      using a b u01 by (simp add: c_def)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   305
    have sumc1: "setsum c S = 1"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   306
      by (simp add: c_def setsum.distrib setsum_right_distrib [symmetric] asum bsum)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   307
    have sumci_xy: "(\<Sum>i\<in>S. c i *\<^sub>R i) = (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
   308
      apply (simp add: c_def setsum.distrib scaleR_left_distrib)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   309
      by (simp only: scaleR_scaleR [symmetric] Real_Vector_Spaces.scaleR_right.setsum [symmetric] aeqx beqy)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   310
    show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   311
    proof (cases "setsum c (S - T) = 0")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   312
      case True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   313
      have ci0: "\<And>i. i \<in> (S - T) \<Longrightarrow> c i = 0"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   314
        using True cge0 by (simp add: \<open>finite S\<close> setsum_nonneg_eq_0_iff)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   315
      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
   316
        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
   317
        by (simp add: c_def Groups.ordered_comm_monoid_add_class.add_nonneg_eq_0_iff)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   318
      have [simp]: "setsum a T = 1"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   319
        using assms by (metis setsum.mono_neutral_cong_right a0 asum)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   320
      show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   321
        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
   322
        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
   323
        using a0 assms
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   324
        apply (auto simp: cge0 a aeqx [symmetric] setsum.mono_neutral_right)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   325
        done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   326
    next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   327
      case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   328
      def k \<equiv> "setsum c (S - T)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   329
      have "k > 0" using False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   330
        unfolding k_def by (metis DiffD1 antisym_conv cge0 setsum_nonneg not_less)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   331
      have weq_sumsum: "w = setsum (\<lambda>x. c x *\<^sub>R x) T + setsum (\<lambda>x. c x *\<^sub>R x) (S - T)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   332
        by (metis (no_types) add.commute S(1) S(2) setsum.subset_diff sumci_xy weq)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   333
      show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   334
      proof (cases "k = 1")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   335
        case True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   336
        then have "setsum c T = 0"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   337
          by (simp add: S k_def setsum_diff sumc1)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   338
        then have [simp]: "setsum c (S - T) = 1"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   339
          by (simp add: S setsum_diff sumc1)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   340
        have ci0: "\<And>i. i \<in> T \<Longrightarrow> c i = 0"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   341
          by (meson `finite T` `setsum c T = 0` \<open>T \<subseteq> S\<close> cge0 setsum_nonneg_eq_0_iff subsetCE)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   342
        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
   343
          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
   344
        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
   345
          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
   346
          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
   347
          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
   348
          done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   349
        then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   350
          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
   351
      next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   352
        case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   353
        then have sumcf: "setsum c T = 1 - k"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   354
          by (simp add: S k_def setsum_diff sumc1)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   355
        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
   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="\<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
   358
          apply auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   359
          apply (metis sumcf cge0 inverse_nonnegative_iff_nonnegative mult_nonneg_nonneg S(2) setsum_nonneg subsetCE)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   360
          apply (metis False mult.commute right_inverse right_minus_eq setsum_right_distrib sumcf)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   361
          by (metis (mono_tags, lifting) scaleR_right.setsum scaleR_scaleR setsum.cong)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   362
        with `0 < k`  have "inverse(k) *\<^sub>R (w - setsum (\<lambda>i. c i *\<^sub>R i) T) \<in> affine hull T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   363
          by (simp add: affine_diff_divide [OF affine_affine_hull] False waff convex_hull_subset_affine_hull [THEN subsetD])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   364
        moreover have "inverse(k) *\<^sub>R (w - setsum (\<lambda>x. c x *\<^sub>R x) T) \<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
   365
          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
   366
          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
   367
          using \<open>k > 0\<close> cge0
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   368
          apply (auto simp: scaleR_right.setsum setsum_right_distrib [symmetric] k_def [symmetric])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   369
          done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   370
        ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   371
          using disj by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   372
      qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   373
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   374
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   375
  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
   376
    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
   377
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   378
    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
   379
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   380
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   381
proposition face_of_convex_hull_insert:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   382
   "\<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
   383
  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
   384
  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
   385
  done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   386
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   387
proposition face_of_affine_trivial:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   388
    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
   389
    shows "T = {} \<or> T = S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   390
proof (rule ccontr, clarsimp)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   391
  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
   392
  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
   393
  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
   394
    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
   395
  have "S \<subseteq> T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   396
  proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   397
    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
   398
    show "b \<in> T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   399
    proof (cases "a = b")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   400
      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
   401
    next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   402
      case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   403
      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
   404
        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
   405
        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
   406
        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
   407
        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
   408
      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
   409
        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
   410
      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
   411
      ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   412
        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
   413
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   414
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   415
  then show False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   416
    using `T \<noteq> S` \<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
   417
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   418
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   419
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   420
lemma face_of_affine_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   421
   "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
   422
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
   423
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   424
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   425
lemma Inter_faces_finite_altbound:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   426
    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
   427
    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
   428
    shows "\<exists>F'. finite F' \<and> F' \<subseteq> T \<and> card F' \<le> DIM('a) + 2 \<and> \<Inter>F' = \<Inter>T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   429
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'))")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   430
  case True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   431
  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
   432
       "\<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
   433
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   434
  def d \<equiv> "rec_nat {c{}} (\<lambda>n r. insert (c r) r)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   435
  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
   436
    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
   437
  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
   438
    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
   439
  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
   440
    by (induction n) auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   441
  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
   442
  using that
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   443
  proof (induction n)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   444
    case 0
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   445
    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
   446
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   447
    case (Suc n)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   448
    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
   449
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   450
  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
   451
  using that
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   452
  proof (induction n)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   453
    case 0
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   454
    then show ?case
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   455
      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
   456
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   457
    case (Suc n)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   458
    have fs: "\<Inter>d (Suc n) face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   459
      by (meson Suc.prems cfaI dn_le_Suc dn_notempty face_of_Inter subsetCE)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   460
    have condn: "convex (\<Inter>d n)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   461
      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
   462
      by (blast intro: face_of_imp_convex cfaI convex_Inter dest: dn_le_Suc)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   463
    have fdn: "\<Inter>d (Suc n) face_of \<Inter>d n"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   464
      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)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   465
    have ne: "\<Inter>d (Suc n) \<noteq> \<Inter>d n"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   466
      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
   467
    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
   468
      by arith
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   469
    have "aff_dim (\<Inter>d (Suc n)) < aff_dim (\<Inter>d n)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   470
      by (rule face_of_aff_dim_lt [OF condn fdn ne])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   471
    moreover have "aff_dim (\<Inter>d n) \<le> int (DIM('a)) - int n"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   472
      using Suc by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   473
    ultimately
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   474
    have "aff_dim (\<Inter>d (Suc n)) \<le> int (DIM('a)) - (n+1)" by arith
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   475
    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
   476
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   477
  have "aff_dim (\<Inter>d (DIM('a) + 2)) \<le> -2"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   478
      using aff_dim_le [OF order_refl] by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   479
  with aff_dim_geq [of "\<Inter>d (DIM('a) + 2)"] show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   480
    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
   481
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   482
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   483
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   484
    apply simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   485
    apply (erule ex_forward)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   486
    by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   487
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   488
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   489
lemma faces_of_translation:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   490
   "{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
   491
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
   492
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
   493
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
   494
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   495
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   496
proposition face_of_Times:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   497
  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
   498
    shows "(F \<times> F') face_of (S \<times> S')"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   499
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   500
  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
   501
    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
   502
  moreover
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   503
  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
   504
    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
   505
  moreover
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   506
    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
   507
       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
   508
       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
   509
  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
   510
    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
   511
      using assms
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   512
      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
   513
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   514
    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
   515
      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
   516
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   517
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   518
    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
   519
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   520
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   521
corollary face_of_Times_decomp:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   522
    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
   523
    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
   524
     (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   525
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   526
  assume c: ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   527
  show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   528
  proof (cases "c = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   529
    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
   530
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   531
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   532
    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
   533
      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
   534
    have "convex c"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   535
      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
   536
    have conv: "convex (fst ` c)" "convex (snd ` c)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   537
      by (simp_all add: \<open>convex c\<close> convex_linear_image fst_linear snd_linear)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   538
    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
   539
            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
   540
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   541
      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
   542
        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
   543
      show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   544
        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
   545
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   546
    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
   547
      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
   548
    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
   549
            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
   550
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   551
      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
   552
        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
   553
      show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   554
        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
   555
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   556
    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
   557
      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
   558
    have cc: "rel_interior c \<subseteq> rel_interior (fst ` c) \<times> rel_interior (snd ` c)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   559
      by (force simp: face_of_Times rel_interior_Times conv fst snd \<open>convex c\<close> fst_linear snd_linear rel_interior_convex_linear_image [symmetric])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   560
    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
   561
      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
   562
      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
   563
      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
   564
      apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   565
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   566
    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
   567
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   568
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   569
  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
   570
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   571
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   572
lemma face_of_Times_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   573
    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
   574
    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
   575
           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
   576
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
   577
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   578
lemma hyperplane_face_of_halfspace_le: "{x. a \<bullet> x = b} face_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
   579
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   580
  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
   581
    by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   582
  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
   583
  show ?thesis by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   584
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   585
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   586
lemma hyperplane_face_of_halfspace_ge: "{x. a \<bullet> x = b} face_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
   587
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   588
  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
   589
    by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   590
  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
   591
  show ?thesis by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   592
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   593
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   594
lemma face_of_halfspace_le:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   595
  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
   596
  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
   597
         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
   598
     (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   599
proof (cases "a = 0")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   600
  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
   601
    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
   602
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   603
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   604
  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
   605
    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
   606
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   607
  proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   608
    assume L: ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   609
    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
   610
      using False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   611
      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
   612
      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
   613
      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
   614
      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
   615
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   616
    with L show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   617
      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
   618
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   619
    assume ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   620
    then show ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   621
      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
   622
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   623
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   624
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   625
lemma face_of_halfspace_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   626
  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
   627
  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
   628
         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
   629
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
   630
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   631
subsection\<open>Exposed faces\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   632
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   633
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
   634
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   635
definition exposed_face_of :: "['a::euclidean_space set, 'a set] \<Rightarrow> bool"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   636
                               (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
   637
  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
   638
         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
   639
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   640
lemma empty_exposed_face_of [iff]: "{} exposed_face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   641
  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
   642
  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
   643
  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
   644
  done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   645
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   646
lemma exposed_face_of_refl_eq [simp]: "S exposed_face_of S \<longleftrightarrow> convex S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   647
  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
   648
  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
   649
  apply force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   650
  done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   651
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   652
lemma exposed_face_of_refl: "convex S \<Longrightarrow> S exposed_face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   653
  by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   654
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   655
lemma exposed_face_of:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   656
    "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
   657
     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
   658
     (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
   659
      (\<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
   660
proof (cases "T = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   661
  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
   662
    by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   663
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   664
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   665
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   666
  proof (cases "T = S")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   667
    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
   668
      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
   669
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   670
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   671
    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
   672
      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
   673
      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
   674
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   675
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   676
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   677
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   678
lemma exposed_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
   679
   "\<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
   680
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
   681
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   682
lemma exposed_face_of_Int_supporting_hyperplane_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   683
   "\<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
   684
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
   685
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   686
proposition exposed_face_of_Int:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   687
  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
   688
      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
   689
    shows "(T \<inter> 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
   690
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   691
  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
   692
               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
   693
               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
   694
    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
   695
  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
   696
                 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
   697
                 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
   698
    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
   699
  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
   700
    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
   701
  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
   702
    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
   703
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   704
    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
   705
    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
   706
    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
   707
    using S s'
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   708
    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
   709
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   710
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   711
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   712
proposition exposed_face_of_Inter:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   713
    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
   714
  assumes "P \<noteq> {}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   715
      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
   716
    shows "\<Inter>P exposed_face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   717
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   718
  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
   719
    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
   720
    by force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   721
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   722
  proof (cases "Q = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   723
    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
   724
      by (metis Inf_empty Inf_lower IntQ assms ex_in_conv subset_antisym top_greatest)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   725
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   726
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   727
    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
   728
      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
   729
    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
   730
      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
   731
      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
   732
      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
   733
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   734
    ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   735
      by (simp add: IntQ)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   736
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   737
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   738
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   739
proposition exposed_face_of_sums:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   740
  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
   741
      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
   742
          (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
   743
  obtains k l
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   744
    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
   745
          "F = {x + y | x y. x \<in> k \<and> y \<in> l}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   746
proof (cases "F = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   747
  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
   748
    using that by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   749
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   750
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   751
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   752
  proof (cases "F = ?ST")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   753
    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
   754
      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
   755
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   756
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   757
    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
   758
    moreover
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   759
    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
   760
                 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
   761
                 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
   762
      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
   763
    ultimately obtain a0 b0
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   764
            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
   765
      by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   766
    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
   767
      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
   768
    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
   769
      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
   770
      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
   771
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   772
    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
   773
      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
   774
      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
   775
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   776
    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
   777
      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
   778
    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
   779
      apply (auto simp: feq)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   780
      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
   781
      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
   782
      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
   783
      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
   784
      apply clarify
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   785
      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
   786
      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
   787
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   788
    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
   789
      by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   790
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   791
      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
   792
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   793
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   794
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   795
subsection\<open>Extreme points of a set: its singleton faces\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   796
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   797
definition extreme_point_of :: "['a::real_vector, 'a set] \<Rightarrow> bool"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   798
                               (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
   799
  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
   800
         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
   801
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   802
lemma extreme_point_of_stillconvex:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   803
   "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
   804
  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
   805
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   806
lemma face_of_singleton:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   807
   "{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
   808
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
   809
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   810
lemma extreme_point_not_in_REL_INTERIOR:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   811
    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
   812
    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
   813
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
   814
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
   815
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   816
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   817
lemma 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
   818
    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
   819
    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
   820
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
   821
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
   822
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
   823
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   824
lemma extreme_point_of_face:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   825
     "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
   826
  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
   827
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   828
lemma extreme_point_of_convex_hull:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   829
   "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
   830
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
   831
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
   832
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
   833
apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   834
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   835
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   836
lemma extreme_points_of_convex_hull:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   837
   "{x. x extreme_point_of (convex hull S)} \<subseteq> S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   838
using extreme_point_of_convex_hull by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   839
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   840
lemma extreme_point_of_empty [simp]: "~ (x extreme_point_of {})"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   841
  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
   842
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   843
lemma extreme_point_of_singleton [iff]: "x extreme_point_of {a} \<longleftrightarrow> x = a"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   844
  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
   845
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   846
lemma extreme_point_of_translation_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   847
   "(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
   848
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
   849
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   850
lemma extreme_points_of_translation:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   851
   "{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
   852
    (\<lambda>x. a + x) ` {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
   853
using extreme_point_of_translation_eq
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   854
by auto (metis (no_types, lifting) image_iff mem_Collect_eq minus_add_cancel)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   855
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   856
lemma extreme_point_of_Int:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   857
   "\<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
   858
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
   859
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   860
lemma 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
   861
   "\<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
   862
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
   863
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
   864
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   865
lemma extreme_point_of_Int_supporting_hyperplane_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   866
   "\<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
   867
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
   868
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
   869
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   870
lemma exposed_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
   871
   "\<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
   872
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
   873
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
   874
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   875
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   876
lemma exposed_point_of_Int_supporting_hyperplane_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   877
    "\<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
   878
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
   879
by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   880
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   881
lemma extreme_point_of_convex_hull_insert:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   882
   "\<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
   883
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
   884
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
   885
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
   886
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
   887
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   888
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   889
subsection\<open>Facets\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   890
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   891
definition facet_of :: "['a::euclidean_space set, 'a set] \<Rightarrow> bool"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   892
                    (infixr "(facet'_of)" 50)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   893
  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
   894
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   895
lemma facet_of_empty [simp]: "~ S facet_of {}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   896
  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
   897
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   898
lemma facet_of_irrefl [simp]: "~ S facet_of S "
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   899
  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
   900
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   901
lemma facet_of_imp_face_of: "F facet_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
   902
  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
   903
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   904
lemma facet_of_imp_subset: "F facet_of S \<Longrightarrow> F \<subseteq> S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   905
  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
   906
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   907
lemma 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
   908
   "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
   909
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
   910
by (auto simp: hyperplane_face_of_halfspace_ge 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
   911
           DIM_positive Suc_leI of_nat_diff aff_dim_halfspace_le)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   912
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   913
lemma hyperplane_facet_of_halfspace_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   914
    "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
   915
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
   916
by (auto simp: hyperplane_face_of_halfspace_le hyperplane_face_of_halfspace_ge
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   917
           DIM_positive Suc_leI of_nat_diff aff_dim_halfspace_ge)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   918
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   919
lemma facet_of_halfspace_le:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   920
    "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
   921
    (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   922
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   923
  assume c: ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   924
  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
   925
    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
   926
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   927
  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
   928
    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
   929
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   930
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   931
lemma facet_of_halfspace_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   932
    "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
   933
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
   934
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   935
subsection \<open>Edges: faces of affine dimension 1\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   936
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   937
definition edge_of :: "['a::euclidean_space set, 'a set] \<Rightarrow> bool"  (infixr "(edge'_of)" 50)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   938
  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
   939
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   940
lemma edge_of_imp_subset:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   941
   "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
   942
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
   943
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   944
subsection\<open>Existence of extreme points\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   945
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   946
lemma different_norm_3_collinear_points:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   947
  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
   948
  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
   949
  shows False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   950
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   951
  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
   952
             and "a \<noteq> b"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   953
             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
   954
    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
   955
  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
   956
             (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
   957
    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
   958
  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
   959
             (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
   960
    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
   961
  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
   962
    using u01 by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   963
  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
   964
    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
   965
  then have "a = b"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   966
    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
   967
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   968
    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
   969
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   970
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   971
proposition extreme_point_exists_convex:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   972
  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
   973
  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
   974
  obtains x where "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
   975
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   976
  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
   977
    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
   978
  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
   979
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   980
    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
   981
    have "a \<noteq> b"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   982
      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
   983
    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
   984
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   985
      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
   986
        by (simp add: that)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   987
      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
   988
        by (simp add: that)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   989
      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
   990
      then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   991
      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
   992
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   993
    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
   994
      using x
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   995
      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
   996
      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
   997
      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
   998
      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
   999
        apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1000
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1001
    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
  1002
      using x
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1003
      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
  1004
      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
  1005
      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
  1006
      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
  1007
        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
  1008
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1009
    ultimately have "~ (norm a < norm x) \<and> ~ (norm b < norm x)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1010
      by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1011
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1012
      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
  1013
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1014
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1015
    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
  1016
    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
  1017
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1018
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1019
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1020
subsection\<open>Krein-Milman, the weaker form\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1021
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1022
proposition Krein_Milman:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1023
  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
  1024
  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
  1025
    shows "S = 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
  1026
proof (cases "S = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1027
  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
  1028
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1029
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1030
  have "closed S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1031
    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
  1032
  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
  1033
    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
  1034
    using assms
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1035
    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
  1036
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1037
  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
  1038
                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
  1039
  proof (rule ccontr)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1040
    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
  1041
    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
  1042
          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
  1043
      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
  1044
      by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1045
    have "continuous_on S (op \<bullet> a)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1046
      by (rule continuous_intros)+
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1047
    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
  1048
      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
  1049
      by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1050
    def T \<equiv> "S \<inter> {x. a \<bullet> x = a \<bullet> m}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1051
    have "m \<in> T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1052
      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
  1053
    moreover have "compact T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1054
      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
  1055
    moreover have "convex T"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1056
      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
  1057
    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
  1058
      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
  1059
    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
  1060
      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
  1061
    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
  1062
      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
  1063
    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
  1064
      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
  1065
    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
  1066
      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
  1067
    then show False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1068
      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
  1069
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1070
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1071
    by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1072
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1073
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1074
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
  1075
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1076
lemma Krein_Milman_Minkowski_aux:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1077
  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
  1078
  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
  1079
    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
  1080
using n S
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1081
proof (induction n arbitrary: S rule: less_induct)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1082
  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
  1083
  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
  1084
    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
  1085
      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
  1086
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1087
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1088
    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
  1089
      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
  1090
    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
  1091
    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
  1092
              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
  1093
              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
  1094
      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
  1095
    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
  1096
      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
  1097
      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
  1098
    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
  1099
      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
  1100
    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
  1101
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1102
      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
  1103
        by (metis inf.cobounded2 span_mono subsetCE that)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1104
      then have "y \<in> {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
  1105
        by (rule span_induct [OF _ subspace_hyperplane])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1106
      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
  1107
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1108
    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
  1109
      by (metis (no_types) less_ay c subsetD dim_eq_span inf.strict_order_iff
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1110
           inf_le1 \<open>dim S = n\<close> not_le rel_interior_subset span_0 span_clauses(1))
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1111
    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
  1112
      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
  1113
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1114
      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
  1115
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1116
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1117
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1118
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1119
theorem Krein_Milman_Minkowski:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1120
  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
  1121
  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
  1122
    shows "S = 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
  1123
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1124
  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
  1125
  proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1126
    fix a assume [simp]: "a \<in> S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1127
    have 1: "compact (op + (- a) ` S)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1128
      by (simp add: \<open>compact S\<close> compact_translation)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1129
    have 2: "convex (op + (- a) ` S)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1130
      by (simp add: \<open>convex S\<close> convex_translation)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1131
    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
  1132
      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
  1133
            convex_hull_translation [of "-a"]
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1134
      by (auto simp: extreme_points_of_translation translation_assoc)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1135
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1136
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1137
  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
  1138
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1139
    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
  1140
      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
  1141
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1142
      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
  1143
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1144
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1145
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1146
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1147
subsection\<open>Applying it to convex hulls of explicitly indicated finite sets\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1148
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1149
lemma Krein_Milman_polytope:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1150
  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
  1151
  shows
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1152
   "finite S
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1153
       \<Longrightarrow> convex hull S =
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1154
           convex hull {x. x extreme_point_of (convex hull S)}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1155
by (simp add: Krein_Milman_Minkowski 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
  1156
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1157
lemma extreme_points_of_convex_hull_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1158
  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
  1159
  shows
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1160
   "\<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
  1161
        \<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
  1162
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
  1163
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1164
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1165
lemma extreme_point_of_convex_hull_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1166
  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
  1167
  shows
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1168
   "\<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
  1169
    \<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
  1170
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
  1171
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1172
lemma extreme_point_of_convex_hull_convex_independent:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1173
  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
  1174
  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
  1175
  shows "(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
  1176
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1177
  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
  1178
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1179
    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
  1180
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1181
      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
  1182
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1183
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1184
    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
  1185
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1186
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1187
lemma extreme_point_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
  1188
  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
  1189
  shows
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1190
   "~ affine_dependent S
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1191
         \<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
  1192
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
  1193
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1194
text\<open>Elementary proofs exist, not requiring Euclidean spaces and all this development\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1195
lemma extreme_point_of_convex_hull_2:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1196
  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
  1197
  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
  1198
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1199
  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
  1200
    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
  1201
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1202
    by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1203
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1204
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1205
lemma extreme_point_of_segment:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1206
  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
  1207
  shows
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1208
   "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
  1209
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
  1210
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1211
lemma face_of_convex_hull_subset:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1212
  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
  1213
  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
  1214
  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
  1215
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
  1216
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
  1217
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
  1218
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1219
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1220
proposition face_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
  1221
  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
  1222
  assumes "~ affine_dependent S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1223
    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
  1224
          (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1225
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1226
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1227
  then show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1228
    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
  1229
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1230
  assume ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1231
  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
  1232
    by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1233
  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
  1234
    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
  1235
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1236
  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
  1237
    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
  1238
  then show ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1239
    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
  1240
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1241
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1242
lemma 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
  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
  assumes "~ affine_dependent S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1245
    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
  1246
           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
  1247
          (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1248
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1249
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1250
  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
  1251
        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
  1252
    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
  1253
  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
  1254
    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
  1255
  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
  1256
    by (metis aff_dim_convex_hull afft eq_diff_eq)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1257
  have "~ affine_dependent c"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1258
    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
  1259
  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
  1260
    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
  1261
    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
  1262
                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
  1263
  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
  1264
    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
  1265
                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
  1266
  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
  1267
    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
  1268
  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
  1269
    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
  1270
  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
  1271
    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
  1272
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1273
  assume ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1274
  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
  1275
    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
  1276
  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
  1277
    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
  1278
  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
  1279
    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
  1280
    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
  1281
    apply (drule bspec, assumption)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1282
    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
  1283
  show ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1284
    apply (subst u)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1285
    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
  1286
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1287
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1288
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1289
lemma facet_of_convex_hull_affine_independent_alt:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1290
  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
  1291
  shows
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1292
   "~affine_dependent S
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1293
        \<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
  1294
             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
  1295
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
  1296
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
  1297
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
  1298
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1299
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1300
lemma segment_face_of:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1301
  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
  1302
  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
  1303
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1304
  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
  1305
    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
  1306
  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
  1307
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1308
    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
  1309
      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
  1310
    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
  1311
      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
  1312
    ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1313
      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
  1314
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1315
  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
  1316
    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
  1317
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1318
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1319
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1320
lemma Krein_Milman_frontier:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1321
  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
  1322
  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
  1323
    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
  1324
          (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1325
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1326
  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
  1327
    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
  1328
  also have "... \<subseteq> ?rhs"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1329
    apply (rule hull_mono)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1330
    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
  1331
    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
  1332
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1333
  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
  1334
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1335
  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
  1336
    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
  1337
  also have "... \<subseteq> ?lhs"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1338
    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
  1339
  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
  1340
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1341
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1342
subsection\<open>Polytopes\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1343
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1344
definition polytope where
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1345
 "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
  1346
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1347
lemma polytope_translation_eq: "polytope (image (\<lambda>x. a + x) S) \<longleftrightarrow> polytope S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1348
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
  1349
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
  1350
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
  1351
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1352
lemma polytope_linear_image: "\<lbrakk>linear f; polytope p\<rbrakk> \<Longrightarrow> polytope(image f p)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1353
  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
  1354
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1355
lemma polytope_empty: "polytope {}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1356
  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
  1357
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1358
lemma polytope_convex_hull: "finite S \<Longrightarrow> polytope(convex hull S)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1359
  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
  1360
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1361
lemma polytope_Times: "\<lbrakk>polytope S; polytope T\<rbrakk> \<Longrightarrow> polytope(S \<times> T)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1362
  unfolding polytope_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1363
  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
  1364
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1365
lemma face_of_polytope_polytope:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1366
  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
  1367
  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
  1368
unfolding polytope_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1369
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
  1370
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1371
lemma finite_polytope_faces:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1372
  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
  1373
  assumes "polytope S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1374
  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
  1375
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1376
  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
  1377
    using assms polytope_def by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1378
  have "finite (op hull convex ` {T. T \<subseteq> v})"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1379
    by (simp add: \<open>finite v\<close>)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1380
  moreover have "{F. F face_of S} \<subseteq> (op hull convex ` {T. T \<subseteq> v})"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1381
    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
  1382
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1383
    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
  1384
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1385
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1386
lemma finite_polytope_facets:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1387
  assumes "polytope S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1388
  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
  1389
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
  1390
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1391
lemma polytope_scaling:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1392
  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
  1393
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
  1394
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1395
lemma polytope_imp_compact:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1396
  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
  1397
  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
  1398
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
  1399
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1400
lemma polytope_imp_convex: "polytope S \<Longrightarrow> convex S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1401
  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
  1402
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1403
lemma polytope_imp_closed:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1404
  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
  1405
  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
  1406
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
  1407
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1408
lemma polytope_imp_bounded:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1409
  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
  1410
  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
  1411
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
  1412
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1413
lemma polytope_interval: "polytope(cbox a b)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1414
  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
  1415
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1416
lemma polytope_sing: "polytope {a}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1417
  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
  1418
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1419
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1420
subsection\<open>Polyhedra\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1421
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1422
definition polyhedron where
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1423
 "polyhedron S \<equiv>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1424
        \<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
  1425
            S = \<Inter> F \<and>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1426
            (\<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
  1427
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1428
lemma polyhedron_Int [intro,simp]:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1429
   "\<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
  1430
  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
  1431
  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
  1432
  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
  1433
  done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1434
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1435
lemma polyhedron_UNIV [iff]: "polyhedron UNIV"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1436
  unfolding polyhedron_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1437
  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
  1438
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1439
lemma polyhedron_Inter [intro,simp]:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1440
   "\<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
  1441
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
  1442
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1443
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1444
lemma polyhedron_empty [iff]: "polyhedron ({} :: 'a :: euclidean_space set)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1445
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1446
  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
  1447
             (\<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
  1448
    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
  1449
  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
  1450
                       {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
  1451
      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
  1452
      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
  1453
      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
  1454
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1455
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1456
    unfolding polyhedron_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1457
    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
  1458
                        {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
  1459
    apply force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1460
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1461
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1462
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1463
lemma polyhedron_halfspace_le:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1464
  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
  1465
  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
  1466
proof (cases "a = 0")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1467
  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
  1468
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1469
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1470
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1471
    unfolding polyhedron_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1472
    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
  1473
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1474
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1475
lemma polyhedron_halfspace_ge:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1476
  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
  1477
  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
  1478
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
  1479
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1480
lemma polyhedron_hyperplane:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1481
  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
  1482
  shows "polyhedron {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
  1483
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1484
  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
  1485
    by force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1486
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1487
    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
  1488
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1489
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1490
lemma affine_imp_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1491
  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
  1492
  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
  1493
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
  1494
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1495
lemma polyhedron_imp_closed:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1496
  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
  1497
  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
  1498
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
  1499
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
  1500
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1501
lemma polyhedron_imp_convex:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1502
  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
  1503
  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
  1504
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
  1505
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
  1506
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1507
lemma polyhedron_affine_hull:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1508
  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
  1509
  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
  1510
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
  1511
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1512
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1513
subsection\<open>Canonical polyhedron representation making facial structure explicit\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1514
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1515
lemma polyhedron_Int_affine:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1516
  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
  1517
  shows "polyhedron S \<longleftrightarrow>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1518
           (\<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
  1519
                (\<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
  1520
        (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1521
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1522
  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
  1523
    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
  1524
    apply (erule ex_forward)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1525
    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
  1526
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1527
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1528
  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
  1529
    apply clarify
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1530
    apply (erule ssubst)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1531
    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
  1532
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1533
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1534
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1535
proposition rel_interior_polyhedron_explicit:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1536
  assumes "finite F"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1537
      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
  1538
      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
  1539
      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
  1540
    shows "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
  1541
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1542
  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
  1543
    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
  1544
  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
  1545
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1546
    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
  1547
      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
  1548
    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
  1549
      by (rule psub)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1550
    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
  1551
                    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
  1552
      by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1553
    have "z \<noteq> x"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1554
      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
  1555
    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
  1556
      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
  1557
    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
  1558
      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
  1559
    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
  1560
      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
  1561
    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
  1562
      by (metis IntI subsetD dist_norm mem_ball)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1563
    def \<xi> \<equiv> "min (1/2) (e / 2 / norm(z - x))"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1564
    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
  1565
      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
  1566
    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
  1567
      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
  1568
    also have "... < e"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1569
      using \<open>z \<noteq> x\<close> \<open>e > 0\<close> by (simp add: \<xi>_def min_def divide_simps norm_minus_commute)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1570
    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
  1571
    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
  1572
      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
  1573
    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
  1574
      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
  1575
      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
  1576
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1577
    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
  1578
      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
  1579
      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
  1580
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1581
    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
  1582
      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
  1583
    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
  1584
      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
  1585
    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
  1586
      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
  1587
    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
  1588
      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
  1589
    with l show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1590
      by simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1591
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1592
  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
  1593
           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
  1594
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1595
    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
  1596
      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
  1597
    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
  1598
      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
  1599
    show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1600
      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
  1601
      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
  1602
      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
  1603
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1604
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1605
  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
  1606
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1607
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1608
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1609
lemma polyhedron_Int_affine_parallel:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1610
  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
  1611
  shows "polyhedron S \<longleftrightarrow>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1612
         (\<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
  1613
              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
  1614
              (\<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
  1615
                             (\<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
  1616
    (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1617
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1618
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1619
  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
  1620
                  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
  1621
    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
  1622
  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
  1623
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1624
  show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1625
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1626
    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
  1627
                  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
  1628
                  (\<forall>w \<in> affine hull S. (w + 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
  1629
        if "h \<in> F" "~(affine hull S \<subseteq> h)" for h
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1630
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1631
      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
  1632
        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
  1633
      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
  1634
        by (metis (no_types) affine_hull_eq_empty inf.absorb_iff2 inf_assoc inf_bot_right inf_commute seq that(2))
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1635
      moreover have "~ (affine hull S \<subseteq> {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
  1636
        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
  1637
      ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1638
        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
  1639
        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
  1640
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1641
    then obtain a b
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1642
         where ab: "\<And>h. \<lbrakk>h \<in> F; ~ (affine hull S \<subseteq> h)\<rbrakk>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1643
             \<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
  1644
                  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
  1645
                  (\<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
  1646
      by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1647
    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
  1648
      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
  1649
    show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1650
      apply (rule_tac x="(\<lambda>h. {x. a h \<bullet> x \<le> b h}) ` {h. h \<in> F \<and> ~(affine hull S \<subseteq> h)}" in exI)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1651
      apply (intro conjI seq2)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1652
        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
  1653
       using ab apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1654
       done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1655
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1656
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1657
  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
  1658
    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
  1659
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1660
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1661
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1662
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1663
proposition polyhedron_Int_affine_parallel_minimal:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1664
  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
  1665
  shows "polyhedron S \<longleftrightarrow>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1666
         (\<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
  1667
              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
  1668
              (\<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
  1669
                             (\<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
  1670
              (\<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
  1671
    (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1672
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1673
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1674
  then obtain f0
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1675
           where f0: "finite f0"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1676
                 "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
  1677
                   (is "?P f0")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1678
                 "\<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
  1679
                             (\<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
  1680
                   (is "?Q f0")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1681
    by (force 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
  1682
  def n \<equiv> "LEAST n. \<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
  1683
  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
  1684
    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
  1685
    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
  1686
    using f0 apply auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1687
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1688
  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
  1689
    by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1690
  then have "~ (finite g \<and> ?P g \<and> ?Q g)" if "card g < n" for g
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1691
    using that by (auto simp: n_def dest!: not_less_Least)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1692
  then have *: "~ (?P g \<and> ?Q g)" if "g \<subset> F" for g
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1693
    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
  1694
    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
  1695
  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
  1696
    by (subst seq) blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1697
  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
  1698
    apply (frule *)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1699
    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
  1700
  show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1701
    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
  1702
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1703
  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
  1704
    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
  1705
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1706
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1707
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1708
lemma polyhedron_Int_affine_minimal:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1709
  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
  1710
  shows "polyhedron S \<longleftrightarrow>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1711
         (\<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
  1712
              (\<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
  1713
              (\<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
  1714
apply (rule iffI)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1715
 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
  1716
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
  1717
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1718
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1719
proposition facet_of_polyhedron_explicit:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1720
  assumes "finite F"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1721
      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
  1722
      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
  1723
      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
  1724
    shows "c facet_of S \<longleftrightarrow> (\<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
  1725
proof (cases "S = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1726
  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
  1727
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1728
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1729
  have "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1730
    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
  1731
    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
  1732
    using assms  apply force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1733
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1734
  then have "convex S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1735
    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
  1736
  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
  1737
  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
  1738
  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
  1739
    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
  1740
  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
  1741
    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
  1742
  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
  1743
    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
  1744
  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
  1745
  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
  1746
  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
  1747
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1748
    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
  1749
      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
  1750
    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
  1751
      by force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1752
    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
  1753
    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
  1754
    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
  1755
      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
  1756
    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
  1757
    finally have xltz: "a h \<bullet> x < a h \<bullet> z" .
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1758
    def l \<equiv> "(b h - a h \<bullet> x) / (a h \<bullet> z - a h \<bullet> x)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1759
    def w \<equiv> "(1 - l) *\<^sub>R x + l *\<^sub>R z"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1760
    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
  1761
      using able xltz \<open>b h < a h \<bullet> z\<close> \<open>h \<in> F\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1762
      by (auto simp: l_def divide_simps)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1763
    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
  1764
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1765
      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
  1766
        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
  1767
      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
  1768
        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
  1769
        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
  1770
        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
  1771
        apply simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1772
        done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1773
      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
  1774
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1775
    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
  1776
      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
  1777
      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
  1778
    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
  1779
      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
  1780
    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
  1781
      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
  1782
    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
  1783
      using seq by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1784
    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
  1785
    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
  1786
      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
  1787
      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
  1788
      apply (subst (asm) seq)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1789
      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
  1790
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1791
    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
  1792
                   (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
  1793
    proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1794
      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
  1795
        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
  1796
        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
  1797
        done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1798
    next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1799
      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
  1800
      proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1801
        fix y
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1802
        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
  1803
        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
  1804
                 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
  1805
        proof (cases "F - {h} = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1806
          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
  1807
            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
  1808
        next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1809
          case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1810
          then obtain h' where h': "h' \<in> F - {h}" by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1811
          def inff \<equiv> "INF j:F - {h}. if 0 < 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
  1812
                                      then (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
  1813
                                      else 1"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1814
          have "0 < inff"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1815
            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
  1816
            apply (rule finite_imp_less_Inf)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1817
              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
  1818
             using h' apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1819
            apply simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1820
            using awlt apply (force simp: divide_simps)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1821
            done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1822
          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
  1823
                        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
  1824
          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
  1825
            case True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1826
            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
  1827
              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
  1828
              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
  1829
              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
  1830
              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
  1831
              done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1832
            then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1833
              using \<open>0 < inff\<close> awlt [OF that] mult_strict_left_mono
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1834
              by (fastforce simp add: algebra_simps divide_simps split: if_split_asm)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1835
          next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1836
            case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1837
            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
  1838
              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
  1839
            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
  1840
              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
  1841
            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
  1842
          qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1843
          ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1844
            by (blast intro: that)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1845
        qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1846
        def c \<equiv> "(1 - T) *\<^sub>R w + T *\<^sub>R y"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1847
        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
  1848
        proof (cases "j = h")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1849
          case True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1850
          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
  1851
            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
  1852
          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
  1853
        next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1854
          case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1855
          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
  1856
            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
  1857
          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
  1858
        qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1859
        moreover have "(1 - T) *\<^sub>R w + T *\<^sub>R y \<in> affine hull S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1860
          apply (rule affine_affine_hull [unfolded affine_alt, rule_format])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1861
          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
  1862
          using yaff apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1863
          done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1864
        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
  1865
          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
  1866
        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
  1867
          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
  1868
        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
  1869
          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
  1870
        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
  1871
          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
  1872
        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
  1873
          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
  1874
        show "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
  1875
          by (metis yeq affine_affine_hull [unfolded affine_alt, rule_format, OF waff caff])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1876
      qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1877
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1878
    ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1879
      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
  1880
      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
  1881
      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
  1882
      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
  1883
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1884
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1885
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1886
  proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1887
    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
  1888
      using * by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1889
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1890
    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
  1891
    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
  1892
      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
  1893
    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
  1894
      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
  1895
    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
  1896
      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
  1897
    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
  1898
      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
  1899
    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
  1900
      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
  1901
    have "c \<noteq> S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1902
      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
  1903
    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
  1904
      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
  1905
    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
  1906
      by force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1907
    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
  1908
      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
  1909
    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
  1910
    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
  1911
    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
  1912
      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
  1913
        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
  1914
       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
  1915
      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
  1916
    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
  1917
      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
  1918
    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
  1919
      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
  1920
    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
  1921
      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
  1922
      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
  1923
      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
  1924
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1925
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1926
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1927
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1928
lemma face_of_polyhedron_subset_explicit:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1929
  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
  1930
  assumes "finite F"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1931
      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
  1932
      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
  1933
      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
  1934
      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
  1935
   obtains h where "h \<in> F" "c \<subseteq> 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
  1936
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1937
  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
  1938
    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
  1939
  have "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1940
    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
  1941
    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
  1942
  then have "convex S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1943
    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
  1944
  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
  1945
    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
  1946
    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
  1947
  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
  1948
    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
  1949
  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
  1950
  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
  1951
    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
  1952
  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
  1953
    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
  1954
  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
  1955
    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
  1956
  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
  1957
    using seq by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1958
  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
  1959
    by (metis affine_Int affine_Inter affine_affine_hull ex_in_conv face_of_affine_trivial)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1960
  then obtain i where "i \<in> F" "~ (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
  1961
    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
  1962
  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
  1963
    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
  1964
  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
  1965
    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
  1966
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1967
    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
  1968
     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
  1969
    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
  1970
    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
  1971
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1972
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1973
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1974
text\<open>Initial part of proof duplicates that above\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1975
proposition face_of_polyhedron_explicit:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1976
  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
  1977
  assumes "finite F"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1978
      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
  1979
      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
  1980
      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
  1981
      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
  1982
    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}}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1983
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1984
  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
  1985
  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
  1986
    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
  1987
  have "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1988
    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
  1989
    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
  1990
  then have "convex S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1991
    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
  1992
  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
  1993
    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
  1994
    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
  1995
  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
  1996
    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
  1997
  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
  1998
  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
  1999
    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
  2000
  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
  2001
    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
  2002
  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
  2003
    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
  2004
  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
  2005
  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
  2006
    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
  2007
  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
  2008
                 "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
  2009
    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
  2010
  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
  2011
    by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2012
  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
  2013
  proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2014
    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
  2015
      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
  2016
      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
  2017
      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
  2018
            unfolding facet_of_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2019
      apply auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2020
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2021
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2022
    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
  2023
      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
  2024
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2025
  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
  2026
                 {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
  2027
    by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2028
  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
  2029
             \<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
  2030
            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
  2031
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2032
    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
  2033
             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
  2034
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2035
      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
  2036
      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
  2037
      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
  2038
      proof cases
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2039
        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
  2040
        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
  2041
          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
  2042
          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
  2043
        then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2044
          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
  2045
      next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2046
        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
  2047
        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
  2048
          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
  2049
      qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2050
      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
  2051
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2052
    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
  2053
      apply (rule hull_mono)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2054
      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
  2055
    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
  2056
          \<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
  2057
      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
  2058
    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
  2059
      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
  2060
    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
  2061
             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
  2062
    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
  2063
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2064
  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
  2065
    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
  2066
    using assms by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2067
  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
  2068
    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
  2069
  have red:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2070
     "(\<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
  2071
     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
  2072
  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
  2073
        \<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
  2074
    apply (rule red)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2075
    apply (metis seq bsub)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2076
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2077
  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
  2078
                    (\<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
  2079
    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
  2080
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2081
    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
  2082
    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
  2083
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2084
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2085
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2086
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2087
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
  2088
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2089
corollary facet_of_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2090
  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
  2091
  obtains a b where "a \<noteq> 0" "S \<subseteq> {x. a \<bullet> x \<le> b}" "c = 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
  2092
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2093
  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
  2094
             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
  2095
             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
  2096
    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
  2097
  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
  2098
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2099
  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
  2100
    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
  2101
    by force
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2102
  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
  2103
     apply (subst seq)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2104
     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
  2105
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2106
    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
  2107
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2108
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2109
corollary face_of_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2110
  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
  2111
    shows "c = \<Inter>{F. F facet_of S \<and> c \<subseteq> F}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2112
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2113
  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
  2114
             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
  2115
             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
  2116
    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
  2117
  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
  2118
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2119
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2120
    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
  2121
    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
  2122
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2123
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2124
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2125
lemma 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
  2126
  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
  2127
  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
  2128
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
  2129
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
  2130
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2131
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2132
lemma exposed_face_of_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2133
  assumes "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2134
    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
  2135
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2136
  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
  2137
    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
  2138
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2139
  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
  2140
  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
  2141
  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
  2142
    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
  2143
      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
  2144
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2145
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2146
    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
  2147
      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
  2148
    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
  2149
      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
  2150
    ultimately have "\<Inter>{fa.
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2151
       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
  2152
      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
  2153
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2154
      using False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2155
      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
  2156
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2157
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2158
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2159
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2160
lemma face_of_polyhedron_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2161
  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
  2162
  assumes "polyhedron S" "c face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2163
    shows "polyhedron c"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2164
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2165
  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
  2166
             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
  2167
             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
  2168
    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
  2169
  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
  2170
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2171
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2172
  proof (cases "c = {} \<or> c = S")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2173
    case True with assms show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2174
      by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2175
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2176
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2177
    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
  2178
    have "{S \<inter> ?ab h |h. h \<in> F \<and> c \<subseteq> S \<inter> ?ab h} \<subseteq> {S \<inter> ?ab 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
  2179
      by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2180
    then have fin: "finite ({S \<inter> ?ab h |h. h \<in> F \<and> 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
  2181
      by (rule finite_subset) (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
  2182
    then have "polyhedron (\<Inter>{S \<inter> ?ab h |h. h \<in> F \<and> 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
  2183
      by (auto simp: \<open>polyhedron S\<close> polyhedron_hyperplane)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2184
    with False show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2185
      using face_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
  2186
      by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2187
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2188
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2189
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2190
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2191
lemma finite_polyhedron_faces:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2192
  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
  2193
  assumes "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2194
    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
  2195
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2196
  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
  2197
             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
  2198
             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
  2199
    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
  2200
  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
  2201
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2202
  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
  2203
    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
  2204
  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
  2205
    apply clarify
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2206
    apply (rename_tac c)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2207
    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
  2208
    apply (erule ssubst)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2209
    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
  2210
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2211
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2212
    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
  2213
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2214
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2215
lemma finite_polyhedron_exposed_faces:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2216
   "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
  2217
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
  2218
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2219
lemma finite_polyhedron_extreme_points:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2220
  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
  2221
  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
  2222
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
  2223
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
  2224
done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2225
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2226
lemma finite_polyhedron_facets:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2227
  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
  2228
  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
  2229
unfolding facet_of_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2230
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
  2231
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2232
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2233
proposition rel_interior_of_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2234
  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
  2235
  assumes "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2236
    shows "rel_interior S = 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
  2237
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2238
  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
  2239
             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
  2240
             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
  2241
    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
  2242
  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
  2243
    by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2244
  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
  2245
    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
  2246
  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
  2247
    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
  2248
  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
  2249
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2250
    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
  2251
    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
  2252
    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
  2253
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2254
    proof cases
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2255
      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
  2256
    next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2257
      case 2
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2258
      have "Collect (op \<in> x) \<notin> Collect (op \<in> (\<Union>{A. A facet_of S}))"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2259
        using xnot by fastforce
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2260
      then have "F \<notin> Collect (op \<in> h)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2261
        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
  2262
      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
  2263
      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
  2264
        apply simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2265
        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
  2266
        apply (simp add: facet)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2267
        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
  2268
        using seq by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2269
      qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2270
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2271
  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
  2272
    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
  2273
  ultimately show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2274
    by (force simp: rel)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2275
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2276
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2277
lemma rel_boundary_of_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2278
  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
  2279
  assumes "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2280
    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
  2281
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
  2282
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2283
lemma rel_frontier_of_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2284
  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
  2285
  assumes "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2286
    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
  2287
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
  2288
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2289
lemma rel_frontier_of_polyhedron_alt:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2290
  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
  2291
  assumes "polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2292
    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
  2293
apply (rule subset_antisym)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2294
  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
  2295
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
  2296
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2297
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2298
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
  2299
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2300
proposition polyhedron_eq_finite_exposed_faces:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2301
  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
  2302
  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
  2303
         (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2304
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2305
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2306
  then show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2307
    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
  2308
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2309
  assume ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2310
  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
  2311
  show ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2312
  proof (cases "S = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2313
    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
  2314
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2315
    case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2316
    def F \<equiv> "{h. h exposed_face_of S \<and> h \<noteq> {} \<and> h \<noteq> S}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2317
    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
  2318
    have hface: "h face_of S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2319
                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}"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2320
         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
  2321
      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
  2322
    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
  2323
      "\<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
  2324
      by metis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2325
    have *: "False"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2326
      if paff: "p \<in> affine hull S" and "p \<notin> S" and
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2327
         pint: "p \<in> \<Inter>{{x. a h \<bullet> x \<le> b h} |h. h \<in> F}" for p
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2328
    proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2329
      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
  2330
        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
  2331
      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
  2332
      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
  2333
      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
  2334
        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
  2335
      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
  2336
        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
  2337
        apply simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2338
        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
  2339
        apply (erule impE)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2340
         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
  2341
        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
  2342
        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
  2343
        done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2344
      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
  2345
        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
  2346
      show False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2347
      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
  2348
        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
  2349
        show False by auto
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2350
      next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2351
        case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2352
        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
  2353
          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
  2354
        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
  2355
          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
  2356
        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
  2357
              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
  2358
              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
  2359
          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
  2360
        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
  2361
          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
  2362
        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
  2363
          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
  2364
        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
  2365
          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
  2366
        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
  2367
          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
  2368
          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
  2369
          done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2370
        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
  2371
          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
  2372
        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
  2373
          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
  2374
        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
  2375
        then show False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2376
          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
  2377
      qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2378
    qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2379
    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
  2380
      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
  2381
    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
  2382
      using * by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2383
    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
  2384
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2385
      apply (rule ssubst)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2386
      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
  2387
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2388
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2389
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2390
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2391
corollary polyhedron_eq_finite_faces:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2392
  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
  2393
  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
  2394
         (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2395
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2396
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2397
  then show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2398
    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
  2399
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2400
  assume ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2401
  then show ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2402
    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
  2403
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2404
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2405
lemma polyhedron_linear_image_eq:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2406
  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
  2407
  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
  2408
    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
  2409
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2410
  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
  2411
    apply safe
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2412
    apply (rule_tac x="inv h ` x" in image_eqI)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2413
    apply (auto simp: \<open>bij h\<close> bij_is_surj image_surj_f_inv_f)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2414
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2415
  have "inj h" using bij_is_inj assms by blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2416
  then have injim: "inj_on (op ` h) A" for A
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2417
    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
  2418
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2419
    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
  2420
    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
  2421
    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
  2422
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2423
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2424
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2425
lemma polyhedron_negations:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2426
  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
  2427
  shows   "polyhedron S \<Longrightarrow> polyhedron(image uminus S)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2428
by (auto simp: polyhedron_linear_image_eq linear_uminus bij_uminus)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2429
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2430
subsection\<open>Relation between polytopes and polyhedra\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2431
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2432
lemma polytope_eq_bounded_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2433
  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
  2434
  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
  2435
         (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2436
proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2437
  assume ?lhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2438
  then show ?rhs
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2439
    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
  2440
                  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
  2441
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2442
  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
  2443
    unfolding polytope_def
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2444
    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
  2445
    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
  2446
    done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2447
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2448
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2449
lemma polytope_Int:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2450
  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
  2451
  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
  2452
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
  2453
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2454
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2455
lemma polytope_Int_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2456
  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
  2457
  shows "\<lbrakk>polytope S; polyhedron 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
  2458
by (simp add: bounded_Int polytope_eq_bounded_polyhedron)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2459
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2460
lemma polyhedron_Int_polytope:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2461
  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
  2462
  shows "\<lbrakk>polyhedron 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
  2463
by (simp add: bounded_Int polytope_eq_bounded_polyhedron)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2464
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2465
lemma polytope_imp_polyhedron:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2466
  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
  2467
  shows "polytope S \<Longrightarrow> polyhedron S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2468
by (simp add: polytope_eq_bounded_polyhedron)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2469
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2470
lemma polytope_facet_exists:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2471
  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
  2472
  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
  2473
  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
  2474
proof (cases "p = {}")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2475
  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
  2476
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2477
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2478
  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
  2479
    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
  2480
    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
  2481
  then
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2482
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2483
    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
  2484
       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
  2485
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2486
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2487
lemma polyhedron_interval [iff]: "polyhedron(cbox a b)"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2488
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
  2489
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2490
lemma polyhedron_convex_hull:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2491
  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
  2492
  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
  2493
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
  2494
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2495
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2496
subsection\<open>Relative and absolute frontier of a polytope\<close>
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2497
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2498
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
  2499
    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
  2500
    assumes "~ affine_dependent S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2501
      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
  2502
proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2503
  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
  2504
  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
  2505
  then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2506
  proof cases
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2507
    case 1 then have "S = {}" by (simp add: `finite S`)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2508
    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
  2509
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2510
    case 2 show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2511
      by (auto intro: card_1_singletonE [OF `card S = 1`])
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2512
  next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2513
    case 3
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2514
    with assms show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2515
      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
  2516
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2517
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2518
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2519
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
  2520
    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
  2521
    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
  2522
      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
  2523
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
  2524
  case True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2525
    have [iff]: "finite S"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2526
      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
  2527
    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
  2528
      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
  2529
    { fix x T
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2530
      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
  2531
      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
  2532
        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
  2533
      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
  2534
        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
  2535
      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
  2536
        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
  2537
        apply simp
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2538
        apply (metis (no_types, hide_lams) Diff_eq_empty_iff Diff_insert0 `a \<notin> T` `T \<subseteq> S` `x \<in> convex hull T`  hull_mono insert_Diff_single   subsetCE)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2539
        done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2540
    } note * = this
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2541
    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
  2542
      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
  2543
      apply (blast intro: *)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2544
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2545
    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
  2546
      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
  2547
    show ?thesis using True
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2548
      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
  2549
      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
  2550
      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
  2551
      apply (rule subset_antisym)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2552
      using 1 apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2553
      using 2 apply blast
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2554
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2555
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2556
  case False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2557
  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
  2558
    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
  2559
    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
  2560
  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
  2561
  proof -
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2562
    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
  2563
      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
  2564
    then show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2565
      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
  2566
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2567
  finally show ?thesis .
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2568
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2569
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2570
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
  2571
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2572
proposition frontier_of_triangle:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2573
    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
  2574
    assumes "DIM('a) = 2"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2575
    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
  2576
          (is "?lhs = ?rhs")
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2577
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
  2578
  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
  2579
    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
  2580
next
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2581
  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
  2582
    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
  2583
  show ?thesis
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2584
  proof
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2585
    show "?lhs \<subseteq> ?rhs"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2586
      using False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2587
      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
  2588
    show "?rhs \<subseteq> ?lhs"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2589
      using False
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2590
      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
  2591
      apply (intro conjI subsetI)
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2592
        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
  2593
       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
  2594
      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
  2595
      done
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2596
  qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2597
qed
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2598
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2599
corollary inside_of_triangle:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2600
    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
  2601
    assumes "DIM('a) = 2"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2602
    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
  2603
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
  2604
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2605
corollary interior_of_triangle:
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2606
    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
  2607
    assumes "DIM('a) = 2"
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2608
    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
  2609
           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
  2610
  using interior_subset
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2611
  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
  2612
e49dc94eb624 Theory of polyhedra: faces, extreme points, polytopes, and the Krein–Milman
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2613
end