diff -r fc252acb7100 -r 880ab0f27ddf src/HOL/Analysis/Convex.thy --- a/src/HOL/Analysis/Convex.thy Wed Jan 16 16:50:35 2019 -0500 +++ b/src/HOL/Analysis/Convex.thy Wed Jan 16 18:14:02 2019 -0500 @@ -14,79 +14,6 @@ "HOL-Library.Set_Algebras" begin -lemma substdbasis_expansion_unique: - assumes d: "d \ Basis" - shows "(\i\d. f i *\<^sub>R i) = (x::'a::euclidean_space) \ - (\i\Basis. (i \ d \ f i = x \ i) \ (i \ d \ x \ i = 0))" -proof - - have *: "\x a b P. x * (if P then a else b) = (if P then x * a else x * b)" - by auto - have **: "finite d" - by (auto intro: finite_subset[OF assms]) - have ***: "\i. i \ Basis \ (\i\d. f i *\<^sub>R i) \ i = (\x\d. if x = i then f x else 0)" - using d - by (auto intro!: sum.cong simp: inner_Basis inner_sum_left) - show ?thesis - unfolding euclidean_eq_iff[where 'a='a] by (auto simp: sum.delta[OF **] ***) -qed - -lemma independent_substdbasis: "d \ Basis \ independent d" - by (rule independent_mono[OF independent_Basis]) - -lemma sum_not_0: "sum f A \ 0 \ \a \ A. f a \ 0" - by (rule ccontr) auto - -lemma subset_translation_eq [simp]: - fixes a :: "'a::real_vector" shows "(+) a ` s \ (+) a ` t \ s \ t" - by auto - -lemma translate_inj_on: - fixes A :: "'a::ab_group_add set" - shows "inj_on (\x. a + x) A" - unfolding inj_on_def by auto - -lemma translation_assoc: - fixes a b :: "'a::ab_group_add" - shows "(\x. b + x) ` ((\x. a + x) ` S) = (\x. (a + b) + x) ` S" - by auto - -lemma translation_invert: - fixes a :: "'a::ab_group_add" - assumes "(\x. a + x) ` A = (\x. a + x) ` B" - shows "A = B" -proof - - have "(\x. -a + x) ` ((\x. a + x) ` A) = (\x. - a + x) ` ((\x. a + x) ` B)" - using assms by auto - then show ?thesis - using translation_assoc[of "-a" a A] translation_assoc[of "-a" a B] by auto -qed - -lemma translation_galois: - fixes a :: "'a::ab_group_add" - shows "T = ((\x. a + x) ` S) \ S = ((\x. (- a) + x) ` T)" - using translation_assoc[of "-a" a S] - apply auto - using translation_assoc[of a "-a" T] - apply auto - done - -lemma translation_inverse_subset: - assumes "((\x. - a + x) ` V) \ (S :: 'n::ab_group_add set)" - shows "V \ ((\x. a + x) ` S)" -proof - - { - fix x - assume "x \ V" - then have "x-a \ S" using assms by auto - then have "x \ {a + v |v. v \ S}" - apply auto - apply (rule exI[of _ "x-a"], simp) - done - then have "x \ ((\x. a+x) ` S)" by auto - } - then show ?thesis by auto -qed - subsection \Convexity\ definition%important convex :: "'a::real_vector set \ bool"