src/HOL/Analysis/Starlike.thy
changeset 66297 d425bdf419f5
parent 66289 2562f151541c
child 66641 ff2e0115fea4
equal deleted inserted replaced
66296:33a47f2d9edc 66297:d425bdf419f5
  5835   then obtain x s' where S: "S = insert x s'" "x \<notin> s'"
  5835   then obtain x s' where S: "S = insert x s'" "x \<notin> s'"
  5836     by (meson Set.set_insert all_not_in_conv)
  5836     by (meson Set.set_insert all_not_in_conv)
  5837   show ?thesis using S
  5837   show ?thesis using S
  5838     apply (simp add: hull_redundant cong: aff_dim_affine_hull2)
  5838     apply (simp add: hull_redundant cong: aff_dim_affine_hull2)
  5839     apply (simp add: affine_hull_insert_span_gen hull_inc)
  5839     apply (simp add: affine_hull_insert_span_gen hull_inc)
  5840     apply (simp add: insert_commute [of a] hull_inc aff_dim_eq_dim [of x] dim_insert span_0)
  5840     apply (simp add: insert_commute [of a] hull_inc aff_dim_eq_dim [of x] dim_insert)
  5841     apply (metis (no_types, lifting) add_minus_cancel image_iff uminus_add_conv_diff)
  5841     apply (metis (no_types, lifting) add_minus_cancel image_iff uminus_add_conv_diff)
  5842     done
  5842     done
  5843 qed
  5843 qed
       
  5844 
       
  5845 lemma affine_dependent_choose:
       
  5846   fixes a :: "'a :: euclidean_space"
       
  5847   assumes "~(affine_dependent S)"
       
  5848   shows "affine_dependent(insert a S) \<longleftrightarrow> a \<notin> S \<and> a \<in> affine hull S"
       
  5849         (is "?lhs = ?rhs")
       
  5850 proof safe
       
  5851   assume "affine_dependent (insert a S)" and "a \<in> S"
       
  5852   then show "False"
       
  5853     using \<open>a \<in> S\<close> assms insert_absorb by fastforce
       
  5854 next
       
  5855   assume lhs: "affine_dependent (insert a S)"
       
  5856   then have "a \<notin> S"
       
  5857     by (metis (no_types) assms insert_absorb)
       
  5858   moreover have "finite S"
       
  5859     using affine_independent_iff_card assms by blast
       
  5860   moreover have "aff_dim (insert a S) \<noteq> int (card S)"
       
  5861     using \<open>finite S\<close> affine_independent_iff_card \<open>a \<notin> S\<close> lhs by fastforce
       
  5862   ultimately show "a \<in> affine hull S"
       
  5863     by (metis aff_dim_affine_independent aff_dim_insert assms)
       
  5864 next
       
  5865   assume "a \<notin> S" and "a \<in> affine hull S"
       
  5866   show "affine_dependent (insert a S)"
       
  5867     by (simp add: \<open>a \<in> affine hull S\<close> \<open>a \<notin> S\<close> affine_dependent_def)
       
  5868 qed
       
  5869 
       
  5870 lemma affine_independent_insert:
       
  5871   fixes a :: "'a :: euclidean_space"
       
  5872   shows "\<lbrakk>~(affine_dependent S); a \<notin> affine hull S\<rbrakk> \<Longrightarrow> ~(affine_dependent(insert a S))"
       
  5873   by (simp add: affine_dependent_choose)
  5844 
  5874 
  5845 lemma subspace_bounded_eq_trivial:
  5875 lemma subspace_bounded_eq_trivial:
  5846   fixes S :: "'a::real_normed_vector set"
  5876   fixes S :: "'a::real_normed_vector set"
  5847   assumes "subspace S"
  5877   assumes "subspace S"
  5848     shows "bounded S \<longleftrightarrow> S = {0}"
  5878     shows "bounded S \<longleftrightarrow> S = {0}"